From f73023cd392eb79ded4ef9c5e7e913505c60bf18 Mon Sep 17 00:00:00 2001 From: t8y2 <1156263951@qq.com> Date: Wed, 15 Jul 2026 01:24:31 +0800 Subject: [PATCH] ci: improve Rust cache reuse --- .github/workflows/ci.yml | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1ae8fd6738..60b27d9ef4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -59,12 +59,6 @@ jobs: steps: - uses: actions/checkout@v5 - - name: Free disk space - run: | - sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/lib/android /usr/local/.ghcup || true - docker system prune -af || true - df -h - - name: Install system dependencies run: | sudo apt-get update @@ -85,6 +79,8 @@ jobs: with: workspaces: "./ -> target" shared-key: ci-rust-fmt-clippy-x86_64-unknown-linux-gnu + # Preserve completed dependency builds when a later lint step fails. + cache-on-failure: true - name: Cargo fmt check run: cargo fmt --check @@ -109,12 +105,6 @@ jobs: steps: - uses: actions/checkout@v5 - - name: Free disk space - run: | - sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/lib/android /usr/local/.ghcup || true - docker system prune -af || true - df -h - - name: Install system dependencies run: | sudo apt-get update @@ -133,6 +123,8 @@ jobs: with: workspaces: "./ -> target" shared-key: ci-rust-test-x86_64-unknown-linux-gnu + # Preserve completed dependency builds when a later test step fails. + cache-on-failure: true - name: Cargo test run: cargo test --workspace --locked