Merge branch 'main' of github.com:teaxyz/pantry.extra into redis.io

This commit is contained in:
neil 2023-01-13 08:02:19 +08:00
commit 9b626b60d2
4 changed files with 78 additions and 10 deletions

View file

@ -8,25 +8,36 @@ jobs:
cd:
runs-on: ubuntu-latest
outputs:
HAS_SECRETS: ${{ secrets.AWS_S3_CACHE != '' }}
HAS_ARTIFACTS: ${{ env.HAS_ARTIFACTS }}
steps:
- uses: actions/checkout@v3
- run: >
grep -E ' github: [^\w]+/[^\w/]+' projects/**/package.yml |
sed -e 's|^projects/\(.*\)/package.yml: *github: \([^/]*/[^/]*\).*|{ "project": "\1", "github": "\2" }|' |
jq -sc . |
curl https://app.tea.xyz/api/receiveWatcherProjects --fail -X PUT \
-H "content-type: application/json" -H "authorization: bearer ${{ secrets.TEA_API_TOKEN }}" -d @-
- uses: teaxyz/setup@v0
- uses: actions/checkout@v3
name: co core
with:
path: pantry.core
repository: teaxyz/pantry.core
- run: ./scripts/map-projects-to-githubs.ts
working-directory: pantry.core
env:
WATCHER_URL: ${{ secrets.WATCHER_URL }}
TEA_API_TOKEN: ${{ secrets.TEA_API_TOKEN }}
- run: ./scripts/has-artifacts.ts ${{ github.repository }} ${{ github.sha }} >>$GITHUB_ENV
working-directory: pantry.core
env:
GITHUB_TOKEN: ${{github.token}}
AWS_S3_CACHE: ${{ secrets.AWS_S3_CACHE }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
bottle-pr:
needs: [cd]
#FIXME: will fail (harmlessly) on non-merge/non-new-version runs, and won't work on 3rd-party PRs
if: ${{ needs.cd.outputs.HAS_SECRETS }}
if: ${{ needs.cd.outputs.HAS_ARTIFACTS == 'true' }}
uses: teaxyz/pantry.core/.github/workflows/bottle.yml@main
secrets: inherit
bottle-standalone:
runs-on: ubuntu-latest
needs: [cd]
if: ${{ ! needs.cd.outputs.HAS_SECRETS }}
if: ${{ needs.cd.outputs.HAS_ARTIFACTS == 'false' }}
steps:
- uses: actions/checkout@v3
- uses: technote-space/get-diff-action@v6

View file

@ -4,6 +4,7 @@ distributable:
versions:
github: cli/cli/tags
ignore: /-pre\./
provides:
- bin/gh

View file

@ -0,0 +1,32 @@
distributable:
# url: https://github.com/jart/blink/archive/refs/tags/{{version}}.tar.gz currently no tags/releases
url: https://github.com/jart/blink/archive/13df12124d69aba8a7f74803715af36ed629b349.tar.gz
strip-components: 1
provides:
- bin/blink
- bin/blinkenlights
versions:
# github: jart/blink/tags FIXME once they start tagging/releasing
- 0.0.0
build:
dependencies:
tea.xyz/gx/cc: c99
tea.xyz/gx/make: '*'
script: |
make -j {{hw.concurrency}}
mkdir {{prefix}}/bin
cp o/blink/blink{,enlights} {{prefix}}/bin
test: |
make check
make check2
make emulates
test:
dependencies:
curl.se: '*'
script: |
curl -O https://raw.githubusercontent.com/jart/blink/13df12124d69aba8a7f74803715af36ed629b349/third_party/cosmo/tinyhello.elf
blink tinyhello.elf

View file

@ -0,0 +1,24 @@
distributable:
url: https://github.com/rwos/gti/archive/v{{version}}.tar.gz
strip-components: 1
versions:
github: rwos/gti/tags
provides:
- bin/gti
build:
dependencies:
tea.xyz/gx/cc: c99
tea.xyz/gx/make: '*'
script: |
make
mkdir "{{prefix}}"/bin
mv gti "{{prefix}}"/bin
test:
dependencies:
git-scm.org: ^2
script:
gti init