diff --git a/.envrc b/.envrc new file mode 100644 index 00000000..bfc07d4b --- /dev/null +++ b/.envrc @@ -0,0 +1,2 @@ +export TEA_PANTRY_PATH=$SRCROOT:$HOME/.tea/tea.xyz/var/pantry +export TEA_PREFIX=$SRCROOT/tea.out diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 2a20264a..67d8797a 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -40,6 +40,7 @@ jobs: with: platform: ${{ matrix.platform }} secrets: inherit + cleanup: needs: [bottle-pr] runs-on: ubuntu-latest @@ -65,6 +66,7 @@ jobs: env: AWS_S3_CACHE: ${{ secrets.AWS_S3_CACHE }} PR: ${{ needs.bottle.outputs.pr }} + bottle-standalone: runs-on: ubuntu-latest needs: [cd] diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 78c5c36e..4572848f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,9 +9,13 @@ jobs: steps: - uses: actions/checkout@v3 - uses: technote-space/get-diff-action@v6 - id: diff + id: get-diff with: PATTERNS: projects/**/package.yml + - id: diff + run: | + RESULT=$(echo ${{ steps.get-diff.outputs.diff }} | sed 's#projects/\(.*\)/.*#\1#') + echo "diff=$RESULT" >> $GITHUB_OUTPUT build: strategy: fail-fast: false diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..9b1e9338 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/tea.out diff --git a/README.md b/README.md index 86c13b96..a8b6f852 100644 --- a/README.md +++ b/README.md @@ -7,20 +7,104 @@ will be maintained by their own communities. > † see [pantry.zero] for “what is a pantry” +# Use with tea/cli + +[tea/cli] clones/updates this pantry and [pantry.core] when installed with +the installer or when you run `tea --sync`. At this time pantries are not +versioned. + +  + # Contributing -See the contributing guide in [pantry.zero][pantry.zero/contributing]. +```sh +$ git clone https://github.com/teaxyz/pantry.extra + +$ cd pantry.extra +# all the following commands operate in `./tea.out` +# your tea installation remains untouched + +$ xc init +# ^^ creates a “wip” package.yml + +$ xc edit +# ^^ opens the new package.yml in your EDITOR + +$ xc build +# ^^ will probably require a (zero permissions) GitHub [PAT]. +# Using `gh auth login` is the easiest way to set this up. + +$ xc test +# ^^ you need to write a test that verifies the package works + +$ gh repo fork +$ git branch -m my-new-package +$ git push origin my-new-package +$ gh pr create +``` + +## Packaging Guide + +Packaging can be cumbersome. +Our [wiki] is our packaging knowledge base. +For other assistance, start a [discussion]. + +## After Your Contribution + +We build “bottles” (tar’d binaries) and upload them to both our centralized +bottle storage and decentralized [IPFS]. + +tea automatically builds new releases of packages *as soon as they are +released* (usually starting the builds within seconds). There is no need to +submit PRs for updates. + +  + + + +# Tasks + +The following can all be run with `xc`, eg. `xc init`. + +## Init + +Creates a new package at `./projects/wip/$RANDOM_TEA_BLEND/package.yml`. + +```sh +tea -E +tea.xyz/brewkit init +``` + +## Edit + +Opens all wip packages in `$EDITOR`. + +```sh +tea -E +tea.xyz/brewkit edit +``` + +## Build + +Builds all wip packages to `./tea.out`. + +```sh +tea -E +tea.xyz/brewkit build +``` + +## Test + +Tests all wip packages. + +```sh +tea -E +tea.xyz/brewkit test +``` + + [pantry.zero]: https://github.com/teaxyz/pantry.zero -[pantry.zero/contributing]: https://github.com/teaxyz/pantry.zero#contributing -[pantry.core]: https://github.com/teaxyz/pantry.core - - -# Dependencies - -We don’t actually need these, but we do for CI/CD currently. - -| Project | Version | -|-------------|---------| -| deno.land | ^1.23 | +[pantry.extra]: https://github.com/teaxyz/pantry.extra +[wiki]: https://github.com/teaxyz/pantry.zero/wiki +[tea/cli]: https://github.com/teaxyz/cli +[discussion]: https://github.com/orgs/teaxyz/discussions +[PAT]: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token +[IPFS]: https://ipfs.tech diff --git a/projects/libjpeg-turbo.org/fixture.jpeg b/projects/libjpeg-turbo.org/fixture.jpeg new file mode 100644 index 00000000..9a717a0d Binary files /dev/null and b/projects/libjpeg-turbo.org/fixture.jpeg differ diff --git a/projects/libjpeg-turbo.org/package.yml b/projects/libjpeg-turbo.org/package.yml new file mode 100644 index 00000000..ecb17eff --- /dev/null +++ b/projects/libjpeg-turbo.org/package.yml @@ -0,0 +1,33 @@ +distributable: + url: https://versaweb.dl.sourceforge.net/project/libjpeg-turbo/{{version}}/libjpeg-turbo-{{version}}.tar.gz + strip-components: 1 + +versions: + github: libjpeg-turbo/libjpeg-turbo + +build: + dependencies: + tea.xyz/gx/cc: c99 + tea.xyz/gx/make: '*' + cmake.org: ^3 + working-directory: build + script: | + cmake .. $ARGS + make --jobs {{ hw.concurrency }} install + env: + ARGS: + - -DCMAKE_INSTALL_PREFIX={{prefix}} + - -DCMAKE_BUILD_TYPE=Release + - -DWITH_JPEG8=1 + +provides: + - bin/cjpeg + - bin/djpeg + - bin/jpegtran + - bin/rdjpgcom + - bin/tjbench + - bin/wrjpgcom + +test: | + jpegtran -crop 1x1 -transpose -perfect -outfile out.jpg fixture.jpeg + test -f out.jpg