mirror of
https://github.com/openai/codex.git
synced 2026-04-28 10:21:06 +03:00
5.7 KiB
5.7 KiB
PR #2242: Fix build break and build release
- URL: https://github.com/openai/codex/pull/2242
- Author: pakrym-oai
- Created: 2025-08-12 21:46:20 UTC
- Updated: 2025-08-12 22:56:53 UTC
- Changes: +18/-6, Files changed: 2, Commits: 7
Description
Build release profile for one configuration.
Full Diff
diff --git a/.github/workflows/rust-ci.yml b/.github/workflows/rust-ci.yml
index 97075a1f07..0fd67175a9 100644
--- a/.github/workflows/rust-ci.yml
+++ b/.github/workflows/rust-ci.yml
@@ -34,7 +34,7 @@ jobs:
# CI to validate on different os/targets
lint_build_test:
- name: ${{ matrix.runner }} - ${{ matrix.target }}
+ name: ${{ matrix.runner }} - ${{ matrix.target }}${{ matrix.profile == 'release' && ' (release)' || '' }}
runs-on: ${{ matrix.runner }}
timeout-minutes: 30
defaults:
@@ -49,18 +49,31 @@ jobs:
include:
- runner: macos-14
target: aarch64-apple-darwin
+ profile: dev
- runner: macos-14
target: x86_64-apple-darwin
+ profile: dev
+ - runner: macos-14
+ target: aarch64-apple-darwin
+ profile: release
- runner: ubuntu-24.04
target: x86_64-unknown-linux-musl
+ profile: dev
+ - runner: ubuntu-24.04
+ target: x86_64-unknown-linux-musl
+ profile: release
- runner: ubuntu-24.04
target: x86_64-unknown-linux-gnu
+ profile: dev
- runner: ubuntu-24.04-arm
target: aarch64-unknown-linux-musl
+ profile: dev
- runner: ubuntu-24.04-arm
target: aarch64-unknown-linux-gnu
+ profile: dev
- runner: windows-latest
target: x86_64-pc-windows-msvc
+ profile: dev
steps:
- uses: actions/checkout@v4
@@ -77,7 +90,7 @@ jobs:
~/.cargo/registry/cache/
~/.cargo/git/db/
${{ github.workspace }}/codex-rs/target/
- key: cargo-${{ matrix.runner }}-${{ matrix.target }}-${{ hashFiles('**/Cargo.lock') }}
+ key: cargo-${{ 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
@@ -86,7 +99,6 @@ jobs:
- name: cargo clippy
id: clippy
- continue-on-error: true
run: cargo clippy --target ${{ matrix.target }} --all-features --tests -- -D warnings
# Running `cargo build` from the workspace root builds the workspace using
@@ -98,12 +110,12 @@ jobs:
id: build
if: ${{ matrix.target == 'x86_64-unknown-linux-gnu' }}
continue-on-error: true
- run: find . -name Cargo.toml -mindepth 2 -maxdepth 2 -print0 | xargs -0 -n1 -I{} bash -c 'cd "$(dirname "{}")" && cargo build'
+ run: find . -name Cargo.toml -mindepth 2 -maxdepth 2 -print0 | xargs -0 -n1 -I{} bash -c 'cd "$(dirname "{}")" && cargo build --profile ${{ matrix.profile }}'
- name: cargo test
id: test
continue-on-error: true
- run: cargo test --all-features --target ${{ matrix.target }}
+ run: cargo test --all-features --target ${{ matrix.target }} --profile ${{ matrix.profile }}
env:
RUST_BACKTRACE: 1
diff --git a/.github/workflows/rust-release.yml b/.github/workflows/rust-release.yml
index 8bf7361da9..d3e313b3cc 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 }}-${{ hashFiles('**/Cargo.lock') }}
+ key: cargo-release-${{ 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
Review Comments
.github/workflows/rust-ci.yml
- Created: 2025-08-12 22:25:09 UTC | Link: https://github.com/openai/codex/pull/2242#discussion_r2271423927
@@ -49,18 +49,28 @@ jobs:
include:
- runner: macos-14
target: aarch64-apple-darwin
+ profile: dev
- runner: macos-14
target: x86_64-apple-darwin
+ profile: dev
+ - runner: macos-14
+ target: aarch64-apple-darwin
+ profile: release
Does this one build the fastest? And can you add a comment here because it's a bit subtle since it's in the middle of the list?
Arguably we should do one Mac and one Linux
releasemode because there is stuff conditionally compiled for Landlock that sometimes I forget to test...
- Created: 2025-08-12 22:25:20 UTC | Link: https://github.com/openai/codex/pull/2242#discussion_r2271424452
@@ -77,7 +87,7 @@ jobs:
~/.cargo/registry/cache/
~/.cargo/git/db/
${{ github.workspace }}/codex-rs/target/
- key: cargo-${{ matrix.runner }}-${{ matrix.target }}-${{ hashFiles('**/Cargo.lock') }}
+ key: cargo-${{ matrix.runner }}-${{ matrix.target }}-${{ matrix.profile }}-${{ hashFiles('**/Cargo.lock') }}
Can/should we update
rust-release.ymlto match and get cache hits?
codex-rs/tui/src/updates.rs
- Created: 2025-08-12 22:46:14 UTC | Link: https://github.com/openai/codex/pull/2242#discussion_r2271480818
@@ -9,6 +9,7 @@ use std::path::Path;
use std::path::PathBuf;
use codex_core::config::Config;
+use codex_core::user_agent::get_codex_user_agent;
rebase because this is merged already?