fix: serialize rust cache uploads

This commit is contained in:
2026-05-03 21:26:04 -07:00
parent d8749d13a0
commit 1386c59eaa
2 changed files with 7 additions and 2 deletions

View File

@@ -13,7 +13,7 @@ inputs:
required: false
cache-version:
description: Cache format version. Bump this to avoid reusing stale or partial cache entries.
default: v2
default: v3
required: false
outputs:
@@ -48,6 +48,7 @@ runs:
id: cache-restore
env:
ACTIONS_CACHE_SERVICE_V2: "0"
CACHE_UPLOAD_CONCURRENCY: "1"
uses: https://gitea.com/actions/cache@v3
with:
path: |

View File

@@ -20,7 +20,7 @@ jobs:
with:
toolchain: stable # optional, defaults to stable
cache-prefix: rust # optional, defaults to rust
cache-version: v2 # optional, defaults to v2
cache-version: v3 # optional, defaults to v3
- run: cargo build --release
- run: cargo test
@@ -33,6 +33,10 @@ jobs:
3. **Rust install** — Runs `rustup` with the minimal profile to install or verify the requested toolchain.
4. **PATH setup** — Appends `$HOME/.cargo/bin` to `$GITHUB_PATH` so cargo/rustc are available in subsequent steps.
The cache upload is serialized with `CACHE_UPLOAD_CONCURRENCY=1` because Gitea
act_runner's cache server stores chunk metadata in BoltDB and can return 500s
under large parallel uploads.
### Cache key format
```