diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 0e82ab94..d645a501 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -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: diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index b7d0ffe6..be50efd9 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -35,6 +35,20 @@ jobs: steps: - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + # Clean stale caches from other workflows that ran on this VPS runner. + # Each VPS has limited disk; leftover caches from tests/checks 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-docs/" ] && continue + echo "Removing stale cache: $dir" + rm -rf "$dir" + done + echo "Disk after cleanup:" + df -h /cache 2>/dev/null || df -h / + # Exclude pezkuwi-zombienet-sdk-tests: its build.rs runs nested cargo build # which doesn't inherit workspace [patch.crates-io] settings, causing # serde_core duplicate lang item error. See: https://github.com/pezkuwichain/pezkuwi-sdk/issues/357