Fix Windows Rust CI cache: full target, Cargo registry, explicit save.

Cache the entire windows-setup target tree plus ~/.cargo; split restore/save; skip cargo build when all release binaries are present.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-14 16:13:24 +03:00
Unverified
parent 7d7e78c534
commit 727aba5bb6
3 changed files with 45 additions and 17 deletions
@@ -1,18 +1,21 @@
name: Cache Windows installer Rust binaries
description: Restore or save compiled windows-setup release executables
name: Restore Windows Rust build cache
description: Restore Cargo registry, git checkouts, and the windows-setup target directory
outputs:
cache-hit:
description: Whether Rust installer tools were restored from cache
description: Whether an exact cache key match was restored
value: ${{ steps.cache.outputs.cache-hit }}
runs:
using: composite
steps:
- uses: actions/cache@v5
- uses: actions/cache/restore@v5
id: cache
with:
path: app/desktop/windows-setup/target/release
key: windows-rust-tools-v1-${{ hashFiles('app/desktop/windows-setup/Cargo.lock') }}
path: |
~/.cargo/registry
~/.cargo/git
app/desktop/windows-setup/target
key: windows-rust-${{ runner.os }}-v2-${{ hashFiles('app/desktop/windows-setup/Cargo.lock', 'app/desktop/windows-setup/Cargo.toml', 'app/desktop/windows-setup/**/src/**', 'app/desktop/windows-setup/**/build.rs') }}
restore-keys: |
windows-rust-tools-v1-
windows-rust-${{ runner.os }}-v2-