@@ -121,6 +121,7 @@ jobs:
121121 arch : x86_64
122122 action : test
123123 flags : --config=clang --define=crypto=system
124+ cache : true
124125 - name : ' V8 on Linux/aarch64'
125126 runtime : ' v8'
126127 repo : ' v8'
@@ -129,12 +130,14 @@ jobs:
129130 action : test
130131 flags : --config=zig-cc-linux-aarch64 --@v8//bazel/config:v8_target_cpu=arm64
131132 deps : qemu-user-static libc6-arm64-cross
133+ cache : true
132134 - name : ' V8 on macOS/x86_64'
133135 runtime : ' v8'
134136 repo : ' v8'
135137 os : macos-11
136138 arch : x86_64
137139 action : test
140+ cache : true
138141 - name : ' WAMR on Linux/x86_64'
139142 runtime : ' wamr'
140143 repo : ' com_github_bytecodealliance_wasm_micro_runtime'
@@ -171,6 +174,7 @@ jobs:
171174 action : test
172175 flags : --config=clang
173176 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
177+ cache : true
174178 - name : ' Wasmtime on macOS/x86_64'
175179 runtime : ' wasmtime'
176180 repo : ' com_github_bytecodealliance_wasmtime'
@@ -184,6 +188,7 @@ jobs:
184188 arch : x86_64
185189 action : test
186190 flags : --config=clang
191+ cache : true
187192
188193 steps :
189194 - uses : actions/checkout@v2
@@ -197,11 +202,12 @@ jobs:
197202 run : docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
198203
199204 - name : Set cache key
200- id : cache-key
205+ if : ${{ matrix. cache }}
201206 run : echo "::set-output name=uniq::$(bazel query --output build //external:${{ matrix.repo }} | grep -E 'sha256|commit' | cut -d\" -f2)"
207+ id : cache-key
202208
203209 - name : Bazel cache
204- if : ${{ matrix.runtime != 'wasmtime' || startsWith(matrix.run_under, 'docker') }}
210+ if : ${{ matrix.cache }}
205211 uses :
PiotrSikora/[email protected] 206212 with :
207213 path : |
@@ -247,11 +253,11 @@ jobs:
247253 //test:signature_util_test
248254
249255 - name : Skip Bazel cache update
250- if : ${{ github.ref != 'refs/heads/master' && (matrix.runtime != 'wasmtime' || startsWith(matrix.run_under, 'docker')) }}
256+ if : ${{ matrix.cache && github.ref != 'refs/heads/master' }}
251257 run : echo "CACHE_SKIP_SAVE=true" >> $GITHUB_ENV
252258
253259 - name : Cleanup Bazel cache
254- if : ${{ github.ref == 'refs/heads/master' && (matrix.runtime != 'wasmtime' || startsWith(matrix.run_under, 'docker')) }}
260+ if : ${{ matrix.cache && github.ref == 'refs/heads/master' }}
255261 run : |
256262 export OUTPUT=$(${{ matrix.run_under }} bazel info output_base)
257263 echo "===== BEFORE ====="
0 commit comments