Skip to content

Commit 981ff4b

Browse files
ci: preserve Mac runner build cache with 200GB safety valve (#3249)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent b9cec6b commit 981ff4b

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

‎.github/workflows/tests-rs-workspace.yml‎

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,21 @@ jobs:
2121
steps:
2222
- name: Check out repo
2323
uses: actions/checkout@v4
24+
with:
25+
clean: false
26+
27+
- name: Clean target if too large
28+
run: |
29+
SIZE=$(du -sm target 2>/dev/null | cut -f1 || true)
30+
SIZE=${SIZE:-0}
31+
echo "target/ size: ${SIZE}MB"
32+
if [ "$SIZE" -gt 200000 ]; then
33+
echo "target/ exceeds 200GB — cleaning"
34+
cargo clean
35+
fi
2436
2537
- name: Install build dependencies
2638
run: |
27-
# Ensure homebrew binaries take precedence over /usr/local/bin
28-
# (mac-runner-2 has a broken /usr/local/bin/cmake that gets SIGKILLed)
2939
echo "/opt/homebrew/bin" >> $GITHUB_PATH
3040
echo "/opt/homebrew/opt/llvm/bin" >> $GITHUB_PATH
3141
brew list cmake &>/dev/null || brew install cmake

0 commit comments

Comments
 (0)