Skip to content

Commit 80954f7

Browse files
authored
ci: get Bazel's output paths from within Docker. (#250)
Signed-off-by: Piotr Sikora <[email protected]>
1 parent d931dd0 commit 80954f7

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

.github/workflows/cpp.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,9 @@ jobs:
253253
- name: Cleanup Bazel cache
254254
if: ${{ github.ref == 'refs/heads/master' && (matrix.runtime != 'wasmtime' || startsWith(matrix.run_under, 'docker')) }}
255255
run: |
256-
export OUTPUT=$(bazel info output_base)
256+
export OUTPUT=$(${{ matrix.run_under }} bazel info output_base)
257+
echo "===== BEFORE ====="
258+
du -s ${OUTPUT}/external/* $(dirname ${OUTPUT})/* | sort -rn | head -20
257259
# BoringSSL's test data (90 MiB).
258260
rm -rf ${OUTPUT}/external/boringssl/crypto_test_data.cc
259261
rm -rf ${OUTPUT}/external/boringssl/src/crypto/*/test/
@@ -271,5 +273,7 @@ jobs:
271273
# Distfiles for Rust toolchains (350 MiB).
272274
rm -rf ${OUTPUT}/external/rust_*/*.tar.gz
273275
# Bazel's repository cache (650-800 MiB) and install base (155 MiB).
274-
rm -rf $(bazel info repository_cache)
275-
rm -rf $(bazel info install_base)
276+
rm -rf ${OUTPUT}/../cache
277+
rm -rf ${OUTPUT}/../install
278+
echo "===== AFTER ====="
279+
du -s ${OUTPUT}/external/* $(dirname ${OUTPUT})/* | sort -rn | head -20

0 commit comments

Comments
 (0)