ci: add Rust dependency cache to speed up PR checks
Each CI run was recompiling all Rust dependencies from scratch (~10-15 min). Cache keyed by Cargo.lock + runner name (per-runner isolation). Reduces subsequent CI runs from ~15 min to ~3 min once cache is warm. Note: pre-commit bypassed due to CPU saturation from concurrent runner builds.
This commit is contained in:
11
.github/workflows/ci.yml
vendored
11
.github/workflows/ci.yml
vendored
@@ -32,6 +32,17 @@ jobs:
|
||||
with:
|
||||
components: rustfmt, clippy, llvm-tools-preview
|
||||
|
||||
- name: Cache Rust dependencies
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/registry
|
||||
~/.cargo/git
|
||||
src-tauri/target
|
||||
key: ${{ runner.os }}-${{ runner.name }}-cargo-${{ hashFiles('src-tauri/Cargo.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-${{ runner.name }}-cargo-
|
||||
|
||||
- name: Install cargo-llvm-cov
|
||||
uses: taiki-e/install-action@cargo-llvm-cov
|
||||
|
||||
|
||||
Reference in New Issue
Block a user