From 63a41970afd0f7098eee1655cd14624a3ef27a26 Mon Sep 17 00:00:00 2001 From: Piotr Sikora Date: Wed, 9 Feb 2022 21:59:19 -0800 Subject: [PATCH 1/2] ci: don't cache WAMR. Following proxy-wasm/proxy-wasm-cpp-host#239, it builds fast enough. Signed-off-by: Piotr Sikora --- .github/workflows/cpp.yml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cpp.yml b/.github/workflows/cpp.yml index fbccd0c92..1ccf8df31 100644 --- a/.github/workflows/cpp.yml +++ b/.github/workflows/cpp.yml @@ -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' @@ -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' @@ -163,6 +166,7 @@ jobs: action: build 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/arm64 piotrsikora/build-tools:bazel-5.0.0-clang-13-gcc-11 + cache: true - name: 'Wasmtime on Linux/s390x' runtime: 'wasmtime' repo: 'com_github_bytecodealliance_wasmtime' @@ -171,6 +175,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' @@ -184,6 +189,7 @@ jobs: arch: x86_64 action: test flags: --config=clang + cache: true steps: - uses: actions/checkout@v2 @@ -197,11 +203,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/cache@v2.1.7-with-skip-cache with: path: | @@ -247,11 +254,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). From 711be6ff47e0c9c2bb100e20d6a8832f18dd9b33 Mon Sep 17 00:00:00 2001 From: Piotr Sikora Date: Wed, 16 Feb 2022 17:34:10 -0800 Subject: [PATCH 2/2] review: fix bad merge (no cache needed for Wasmtime). Signed-off-by: Piotr Sikora --- .github/workflows/cpp.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/cpp.yml b/.github/workflows/cpp.yml index 4f54fba46..09c6c749d 100644 --- a/.github/workflows/cpp.yml +++ b/.github/workflows/cpp.yml @@ -166,7 +166,6 @@ jobs: action: build flags: --config=zig-cc-linux-aarch64 deps: qemu-user-static libc6-arm64-cross - cache: true - name: 'Wasmtime on Linux/s390x' runtime: 'wasmtime' repo: 'com_github_bytecodealliance_wasmtime'