From 7eee69d821d1a9c410306fd261dc6fe0636e56a7 Mon Sep 17 00:00:00 2001 From: Michael Bolin Date: Thu, 28 Aug 2025 23:48:29 -0700 Subject: [PATCH] fix: try to populate the Windows cache for release builds when PRs are put up for review (#2884) Windows release builds take close to 12 minutes whereas Mac/Linux are closer to 5. Let's see if this speeds things up? --- .github/workflows/rust-ci.yml | 5 +++++ .github/workflows/rust-release.yml | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/rust-ci.yml b/.github/workflows/rust-ci.yml index 7d02c95d..22a9291a 100644 --- a/.github/workflows/rust-ci.yml +++ b/.github/workflows/rust-ci.yml @@ -103,12 +103,17 @@ jobs: # Also run representative release builds on Mac and Linux because # there could be release-only build errors we want to catch. + # Hopefully this also pre-populates the build cache to speed up + # releases. - runner: macos-14 target: aarch64-apple-darwin profile: release - 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 diff --git a/.github/workflows/rust-release.yml b/.github/workflows/rust-release.yml index 0044b864..a6d8128a 100644 --- a/.github/workflows/rust-release.yml +++ b/.github/workflows/rust-release.yml @@ -87,7 +87,7 @@ jobs: ~/.cargo/registry/cache/ ~/.cargo/git/db/ ${{ github.workspace }}/codex-rs/target/ - key: cargo-release-${{ matrix.runner }}-${{ matrix.target }}-release-${{ hashFiles('**/Cargo.lock') }} + key: cargo-${{ matrix.runner }}-${{ matrix.target }}-release-${{ hashFiles('**/Cargo.lock') }} - if: ${{ matrix.target == 'x86_64-unknown-linux-musl' || matrix.target == 'aarch64-unknown-linux-musl'}} name: Install musl build tools