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
+21 -10
View File
@@ -146,21 +146,32 @@ jobs:
- uses: dtolnay/rust-toolchain@stable
with:
targets: x86_64-pc-windows-msvc
- name: Cache Cargo registry
uses: actions/cache@v5
with:
path: |
~/.cargo/registry
~/.cargo/git
key: cargo-registry-${{ runner.os }}-${{ hashFiles('app/desktop/windows-setup/Cargo.lock') }}
restore-keys: |
cargo-registry-${{ runner.os }}-
- uses: ./.github/actions/cache-windows-rust-tools
id: rust-tools-cache
- name: Verify Windows Rust binaries
id: rust-binaries
shell: bash
run: |
ready=true
for exe in \
FromChat-Installer.exe \
FromChat-Installer-Helper.exe \
fromchat-portable-launcher.exe \
fromchat-pack.exe \
fromchat-icon-patch.exe
do
if [[ ! -f "app/desktop/windows-setup/target/release/$exe" ]]; then
echo "Missing $exe"
ready=false
fi
done
echo "ready=$ready" >> "$GITHUB_OUTPUT"
- name: Build Windows installer Rust tooling
if: steps.rust-tools-cache.outputs.cache-hit != 'true'
if: steps.rust-binaries.outputs.ready != 'true'
shell: bash
run: ./gradlew :app:desktop:buildWindowsSetupRust --no-daemon --console=plain
- uses: ./.github/actions/save-windows-rust-cache
if: always()
- uses: actions/upload-artifact@v5
with:
name: windows-rust-tools