Skip to content

armgit / codex

Public Imported from GitHub
0

Lightweight coding agent that runs in your terminal

Rust

tmp: drop sccache for windows (#6673)

jif-oai4719cba19afb
diff --git a/.github/workflows/rust-ci.yml b/.github/workflows/rust-ci.yml
index 5d3103d7b2..51b41aa90e 100644
--- a/.github/workflows/rust-ci.yml
+++ b/.github/workflows/rust-ci.yml
@@ -95,8 +95,9 @@ 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' }}
+ RUSTC_WRAPPER: ${{ startsWith(matrix.runner, 'windows') && '' || 'sccache' }}
CARGO_INCREMENTAL: "0"
SCCACHE_CACHE_SIZE: 10G
@@ -170,12 +171,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
@@ -189,7 +192,7 @@ jobs:
fi
- 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 +277,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 +285,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 +329,9 @@ 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' }}
+ RUSTC_WRAPPER: ${{ startsWith(matrix.runner, 'windows') && '' || 'sccache' }}
CARGO_INCREMENTAL: "0"
SCCACHE_CACHE_SIZE: 10G
@@ -370,12 +375,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
@@ -389,7 +396,7 @@ jobs:
fi
- 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 +431,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 +439,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: |
{