Skip to content

ci: don't cache WAMR. #252

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 17, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions .github/workflows/cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ jobs:
arch: x86_64
action: test
flags: --config=clang --define=crypto=system
cache: true
- name: 'V8 on Linux/aarch64'
runtime: 'v8'
repo: 'v8'
Expand All @@ -129,12 +130,14 @@ jobs:
action: test
flags: --config=zig-cc-linux-aarch64 --@v8//bazel/config:v8_target_cpu=arm64
deps: qemu-user-static libc6-arm64-cross
cache: true
- name: 'V8 on macOS/x86_64'
runtime: 'v8'
repo: 'v8'
os: macos-11
arch: x86_64
action: test
cache: true
- name: 'WAMR on Linux/x86_64'
runtime: 'wamr'
repo: 'com_github_bytecodealliance_wasm_micro_runtime'
Expand Down Expand Up @@ -171,6 +174,7 @@ jobs:
action: test
flags: --config=clang
run_under: docker run --rm --env HOME=$HOME --env USER=$(id -un) --volume "$HOME:$HOME" --workdir $(pwd) --user $(id -u):$(id -g) --platform linux/s390x piotrsikora/build-tools:bazel-5.0.0-clang-13-gcc-11
cache: true
- name: 'Wasmtime on macOS/x86_64'
runtime: 'wasmtime'
repo: 'com_github_bytecodealliance_wasmtime'
Expand All @@ -184,6 +188,7 @@ jobs:
arch: x86_64
action: test
flags: --config=clang
cache: true

steps:
- uses: actions/checkout@v2
Expand All @@ -197,11 +202,12 @@ jobs:
run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes

- name: Set cache key
id: cache-key
if: ${{ matrix.cache }}
run: echo "::set-output name=uniq::$(bazel query --output build //external:${{ matrix.repo }} | grep -E 'sha256|commit' | cut -d\" -f2)"
id: cache-key

- name: Bazel cache
if: ${{ matrix.runtime != 'wasmtime' || startsWith(matrix.run_under, 'docker') }}
if: ${{ matrix.cache }}
uses: PiotrSikora/[email protected]
with:
path: |
Expand Down Expand Up @@ -247,11 +253,11 @@ jobs:
//test:signature_util_test

- name: Skip Bazel cache update
if: ${{ github.ref != 'refs/heads/master' && (matrix.runtime != 'wasmtime' || startsWith(matrix.run_under, 'docker')) }}
if: ${{ matrix.cache && github.ref != 'refs/heads/master' }}
run: echo "CACHE_SKIP_SAVE=true" >> $GITHUB_ENV

- name: Cleanup Bazel cache
if: ${{ github.ref == 'refs/heads/master' && (matrix.runtime != 'wasmtime' || startsWith(matrix.run_under, 'docker')) }}
if: ${{ matrix.cache && github.ref == 'refs/heads/master' }}
run: |
export OUTPUT=$(bazel info output_base)
# BoringSSL's test data (90 MiB).
Expand Down