mirror of
https://github.com/openai/codex.git
synced 2026-09-15 12:08:01 +00:00
Use thin LTO for alpha Rust release builds
Alpha release turnaround is currently limited by fat LTO in release builds. We want faster alpha publishing without changing optimization settings for stable artifacts. This change keeps `[profile.release] lto = "fat"` as the default in Cargo.toml, but overrides LTO in CI using `CARGO_PROFILE_RELEASE_LTO`: - `rust-release.yml`: use `thin` for `-alpha` tags, otherwise `fat` - `shell-tool-mcp.yml`: use `thin` for `-alpha` versions, otherwise `fat` Benefits: - Faster alpha build + publish latency - No release-prep churn from committing temporary Cargo.toml LTO flips - Stable/beta release behavior remains unchanged Tradeoffs: - Alpha binaries may be somewhat larger and/or slightly slower than fat-LTO builds - LTO policy now lives in workflow logic for two pipelines, so consistency must be maintained across both files
This commit is contained in:
1
.github/workflows/rust-release.yml
vendored
1
.github/workflows/rust-release.yml
vendored
@@ -58,6 +58,7 @@ jobs:
|
||||
working-directory: codex-rs
|
||||
env:
|
||||
CODEX_BWRAP_ENABLE_FFI: ${{ contains(matrix.target, 'unknown-linux') && '1' || '0' }}
|
||||
CARGO_PROFILE_RELEASE_LTO: ${{ contains(github.ref_name, '-alpha') && 'thin' || 'fat' }}
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
|
||||
2
.github/workflows/shell-tool-mcp.yml
vendored
2
.github/workflows/shell-tool-mcp.yml
vendored
@@ -72,6 +72,8 @@ jobs:
|
||||
needs: metadata
|
||||
runs-on: ${{ matrix.runner }}
|
||||
timeout-minutes: 30
|
||||
env:
|
||||
CARGO_PROFILE_RELEASE_LTO: ${{ contains(needs.metadata.outputs.version, '-alpha') && 'thin' || 'fat' }}
|
||||
defaults:
|
||||
run:
|
||||
working-directory: codex-rs
|
||||
|
||||
Reference in New Issue
Block a user