fix: add cache cleanup step to prevent disk exhaustion in CI
This commit is contained in:
@@ -38,6 +38,20 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4.1.7
|
||||
|
||||
# Clean stale caches from other workflows that ran on this VPS runner.
|
||||
# Each VPS has limited disk; leftover caches from docs/tests can fill it.
|
||||
- name: Clean stale caches
|
||||
run: |
|
||||
echo "Disk before cleanup:"
|
||||
df -h /cache 2>/dev/null || df -h /
|
||||
for dir in /cache/cargo-target/*/; do
|
||||
[ "$dir" = "/cache/cargo-target/pezkuwi-sdk/" ] && continue
|
||||
echo "Removing stale cache: $dir"
|
||||
rm -rf "$dir"
|
||||
done
|
||||
echo "Disk after cleanup:"
|
||||
df -h /cache 2>/dev/null || df -h /
|
||||
|
||||
- name: Rust Cache
|
||||
uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2.7.8
|
||||
with:
|
||||
|
||||
Reference in New Issue
Block a user