From 98a90a3bb2567e45cf1242b9dcf6959f873776a6 Mon Sep 17 00:00:00 2001 From: jif-oai Date: Mon, 17 Nov 2025 17:39:15 +0100 Subject: [PATCH] tmp: drop sccache for windows 2 (#6775) --- .github/workflows/rust-ci.yml | 37 ++++++++++++++++++++++++----------- 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/.github/workflows/rust-ci.yml b/.github/workflows/rust-ci.yml index 5d3103d7b..0bd91ca53 100644 --- a/.github/workflows/rust-ci.yml +++ b/.github/workflows/rust-ci.yml @@ -95,8 +95,8 @@ jobs: run: working-directory: codex-rs env: - # Speed up repeated builds across CI runs by caching compiled objects. - RUSTC_WRAPPER: sccache + # Speed up repeated builds across CI runs by caching compiled objects (non-Windows). + USE_SCCACHE: ${{ startsWith(matrix.runner, 'windows') && 'false' || 'true' }} CARGO_INCREMENTAL: "0" SCCACHE_CACHE_SIZE: 10G @@ -170,12 +170,14 @@ jobs: # Install and restore sccache cache - name: Install sccache + if: ${{ env.USE_SCCACHE == 'true' }} uses: taiki-e/install-action@44c6d64aa62cd779e873306675c7a58e86d6d532 # v2 with: tool: sccache version: 0.7.5 - name: Configure sccache backend + if: ${{ env.USE_SCCACHE == 'true' }} shell: bash run: | set -euo pipefail @@ -188,8 +190,13 @@ jobs: echo "Using sccache local disk + actions/cache fallback" fi + - name: Enable sccache wrapper + if: ${{ env.USE_SCCACHE == 'true' }} + shell: bash + run: echo "RUSTC_WRAPPER=sccache" >> "$GITHUB_ENV" + - name: Restore sccache cache (fallback) - if: ${{ env.SCCACHE_GHA_ENABLED != 'true' }} + if: ${{ env.USE_SCCACHE == 'true' && env.SCCACHE_GHA_ENABLED != 'true' }} id: cache_sccache_restore uses: actions/cache/restore@v4 with: @@ -274,7 +281,7 @@ jobs: key: cargo-home-${{ matrix.runner }}-${{ matrix.target }}-${{ matrix.profile }}-${{ hashFiles('**/Cargo.lock') }}-${{ hashFiles('codex-rs/rust-toolchain.toml') }} - name: Save sccache cache (fallback) - if: always() && !cancelled() && env.SCCACHE_GHA_ENABLED != 'true' + if: always() && !cancelled() && env.USE_SCCACHE == 'true' && env.SCCACHE_GHA_ENABLED != 'true' continue-on-error: true uses: actions/cache/save@v4 with: @@ -282,12 +289,12 @@ jobs: key: sccache-${{ matrix.runner }}-${{ matrix.target }}-${{ matrix.profile }}-${{ hashFiles('**/Cargo.lock') }}-${{ github.run_id }} - name: sccache stats - if: always() + if: always() && env.USE_SCCACHE == 'true' continue-on-error: true run: sccache --show-stats || true - name: sccache summary - if: always() + if: always() && env.USE_SCCACHE == 'true' shell: bash run: | { @@ -326,7 +333,8 @@ jobs: run: working-directory: codex-rs env: - RUSTC_WRAPPER: sccache + # Speed up repeated builds across CI runs by caching compiled objects (non-Windows). + USE_SCCACHE: ${{ startsWith(matrix.runner, 'windows') && 'false' || 'true' }} CARGO_INCREMENTAL: "0" SCCACHE_CACHE_SIZE: 10G @@ -370,12 +378,14 @@ jobs: cargo-home-${{ matrix.runner }}-${{ matrix.target }}-${{ matrix.profile }}- - name: Install sccache + if: ${{ env.USE_SCCACHE == 'true' }} uses: taiki-e/install-action@44c6d64aa62cd779e873306675c7a58e86d6d532 # v2 with: tool: sccache version: 0.7.5 - name: Configure sccache backend + if: ${{ env.USE_SCCACHE == 'true' }} shell: bash run: | set -euo pipefail @@ -388,8 +398,13 @@ jobs: echo "Using sccache local disk + actions/cache fallback" fi + - name: Enable sccache wrapper + if: ${{ env.USE_SCCACHE == 'true' }} + shell: bash + run: echo "RUSTC_WRAPPER=sccache" >> "$GITHUB_ENV" + - name: Restore sccache cache (fallback) - if: ${{ env.SCCACHE_GHA_ENABLED != 'true' }} + if: ${{ env.USE_SCCACHE == 'true' && env.SCCACHE_GHA_ENABLED != 'true' }} id: cache_sccache_restore uses: actions/cache/restore@v4 with: @@ -424,7 +439,7 @@ jobs: key: cargo-home-${{ matrix.runner }}-${{ matrix.target }}-${{ matrix.profile }}-${{ hashFiles('**/Cargo.lock') }}-${{ hashFiles('codex-rs/rust-toolchain.toml') }} - name: Save sccache cache (fallback) - if: always() && !cancelled() && env.SCCACHE_GHA_ENABLED != 'true' + if: always() && !cancelled() && env.USE_SCCACHE == 'true' && env.SCCACHE_GHA_ENABLED != 'true' continue-on-error: true uses: actions/cache/save@v4 with: @@ -432,12 +447,12 @@ jobs: key: sccache-${{ matrix.runner }}-${{ matrix.target }}-${{ matrix.profile }}-${{ hashFiles('**/Cargo.lock') }}-${{ github.run_id }} - name: sccache stats - if: always() + if: always() && env.USE_SCCACHE == 'true' continue-on-error: true run: sccache --show-stats || true - name: sccache summary - if: always() + if: always() && env.USE_SCCACHE == 'true' shell: bash run: | {