From f940ddb5364e2d44103968be70cf1479771bdcac Mon Sep 17 00:00:00 2001 From: Michael Bolin Date: Thu, 28 Aug 2025 23:30:07 -0700 Subject: [PATCH] fix: try to populate the Windows cache for release builds when PRs are put up for review --- .github/workflows/rust-ci.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/rust-ci.yml b/.github/workflows/rust-ci.yml index 7d02c95dee..a686cc5460 100644 --- a/.github/workflows/rust-ci.yml +++ b/.github/workflows/rust-ci.yml @@ -109,6 +109,9 @@ jobs: - runner: ubuntu-24.04 target: x86_64-unknown-linux-musl profile: release + - runner: windows-latest + target: x86_64-pc-windows-msvc + profile: release steps: - uses: actions/checkout@v5 @@ -125,7 +128,10 @@ jobs: ~/.cargo/registry/cache/ ~/.cargo/git/db/ ${{ github.workspace }}/codex-rs/target/ - key: cargo-${{ matrix.runner }}-${{ matrix.target }}-${{ matrix.profile }}-${{ hashFiles('**/Cargo.lock') }} + # Use the same key format as rust-release.yml for release builds + # so release jobs can reuse this cache. Fall back to the dev key + # format for non-release builds. + key: ${{ matrix.profile == 'release' && format('cargo-release-{0}-{1}-release-{2}', matrix.runner, matrix.target, hashFiles('**/Cargo.lock')) || format('cargo-{0}-{1}-{2}-{3}', matrix.runner, matrix.target, matrix.profile, hashFiles('**/Cargo.lock')) }} - if: ${{ matrix.target == 'x86_64-unknown-linux-musl' || matrix.target == 'aarch64-unknown-linux-musl'}} name: Install musl build tools