diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 20e4eef..bb77aa1 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -36,13 +36,22 @@ jobs: with: components: rustfmt, clippy - # rust-cache, not a plain actions/cache of target/: that one restored - # through the cargo- prefix and saved everything back, so stale - # artifacts piled up (1.2 GB by v0.8.4) and run #40 filled the shared - # runner's disk. rust-cache keeps only compiled dependencies, drops our - # own crate and stale files before saving, and turns off incremental. + # Downloads only, no target/: caching target/ through the cargo- + # restore prefix saved every stale artifact back, the cache reached + # 1.2 GB and run #40 filled the shared runner's disk. Dependencies are + # recompiled each run instead. (Swatinem/rust-cache would keep them, + # but the runner resolves actions from git.app.ygg and it isn't + # mirrored there.) The key has a v2 prefix so no old cache with target/ + # in it is restored. - name: Cache cargo - uses: Swatinem/rust-cache@v2 + uses: actions/cache@v4 + with: + path: | + ~/.cargo/registry/index + ~/.cargo/registry/cache + ~/.cargo/git/db + key: cargo-v2-${{ hashFiles('Cargo.lock') }} + restore-keys: cargo-v2- - name: Check formatting run: cargo fmt --check