Skip to content

Commit

Permalink
chore(spec): use local cache for multiple builds
Browse files Browse the repository at this point in the history
  • Loading branch information
0xfourzerofour committed Oct 5, 2023
1 parent bfbe608 commit fc76b8e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
17 changes: 17 additions & 0 deletions .github/workflows/compliance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,17 @@ jobs:
submodules: recursive
- name: Install protobuf
run: sudo apt-get -y install protobuf-compiler
- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'
- name: Install toolchain
uses: dtolnay/rust-toolchain@stable
with:
Expand All @@ -29,5 +40,11 @@ jobs:
uses: foundry-rs/foundry-toolchain@v1
- name: Setup PDM
uses: pdm-project/setup-pdm@v3
with:
cache: true
- name: Run spec tests
run: ./test/spec-tests/ci/run-spec-tests.sh
- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
3 changes: 2 additions & 1 deletion test/spec-tests/ci/run-spec-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ cd "$(dirname "$0")"

(cd ../bundler-spec-tests && pdm install && pdm run update-deps)


docker buildx create --use
docker buildx build -t alchemy-platform/rundler:latest --cache-to=gha --cache-from=gha ../../..
docker buildx build --cache-from type=local,src=/tmp/.buildx-cache --cache-to type=local,dest=/tmp/.buildx-cache-new -t alchemy-platform/rundler:latest ../../..

(cd ../bundler-spec-tests && pdm run test --url http://127.0.0.1:3000 --launcher-script=../launchers/rundler-launcher/rundler-launcher.sh $@)

Expand Down

0 comments on commit fc76b8e

Please sign in to comment.