Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
136 commits
Select commit Hold shift + click to select a range
08ed618
chore: introduce ConversationManager as a clearinghouse for all conve…
bolinfest Aug 13, 2025
99a242e
[codex-cli] Add ripgrep as a dependency for node environment (#2237)
dylan-hurd-oai Aug 13, 2025
d4533a0
TUI: change the diff preview to have color fg not bg (#2270)
aibrahim-oai Aug 13, 2025
37fc418
fix: update `OutgoingMessageSender::send_response()` to take `Seriali…
bolinfest Aug 13, 2025
41eb59a
Wait for requested delay in rate limit errors (#2266)
pakrym-oai Aug 13, 2025
cbf9720
use modifier dim instead of gray and .dim (#2273)
aibrahim-oai Aug 13, 2025
bb9ce3c
tui: standardize tree prefix glyphs to └ (#2274)
nornagon-openai Aug 13, 2025
3a0656d
fix: skip `cargo test` for release builds on ordinary CI because it i…
bolinfest Aug 13, 2025
de2c6a2
Enable reasoning for codex-prefixed models (#2275)
pakrym-oai Aug 14, 2025
e7bad65
feat: support traditional JSON-RPC request/response in MCP server (#2…
bolinfest Aug 14, 2025
a62510e
fix: verify notifications are sent with the conversationId set (#2278)
bolinfest Aug 14, 2025
f1be797
Parse reasoning text content (#2277)
pakrym-oai Aug 14, 2025
e8ffecd
Clarify PR/Contribution guidelines and issue templates (#2281)
gpeal Aug 14, 2025
6d0eb91
Use enhancement tag for feature requests (#2282)
seratch Aug 14, 2025
085f166
fix: make all fields of Session private (#2285)
bolinfest Aug 14, 2025
539f4b2
fix: add support for exec and apply_patch approvals in the new wire f…
bolinfest Aug 14, 2025
f968a13
feat: add support for an InterruptConversation request (#2287)
bolinfest Aug 14, 2025
cf7a7e6
exploration: create Session as part of Codex::spawn() (#2291)
bolinfest Aug 14, 2025
cdd33b2
Tag InputItem (#2304)
gpeal Aug 14, 2025
585f7b0
HistoryCell is a trait (#2283)
nornagon-openai Aug 14, 2025
b42e679
remove "status text" in bottom line (#2279)
nornagon-openai Aug 14, 2025
544980c
[context] Store context messages in rollouts (#2243)
dylan-hurd-oai Aug 14, 2025
475ba13
remove the · animation (#2271)
nornagon-openai Aug 14, 2025
b62c2d9
remove logs from composer by default (#2307)
aibrahim-oai Aug 14, 2025
8f11652
fix: parallelize logic in Session::new() (#2305)
bolinfest Aug 14, 2025
c25f3ea
fix: do not allow dotenv to create/modify environment variables start…
bolinfest Aug 14, 2025
fd2b059
text elements in textarea for pasted content (#2302)
nornagon-openai Aug 14, 2025
20cd61e
use a central animation loop (#2268)
nornagon-openai Aug 14, 2025
7038827
fix bash commands being incorrectly quoted in display (#2313)
nornagon-openai Aug 14, 2025
992e81d
test(core): add seatbelt sem lock tests (#1823)
davidhao3300 Aug 14, 2025
a8c7f53
fix: move general sandbox tests to codex-rs/core/tests/sandbox.rs (#2…
bolinfest Aug 14, 2025
2ecca79
fix: run python_multiprocessing_lock_works integration test on Mac an…
bolinfest Aug 14, 2025
6a0f709
fix: add call_id to ApprovalParams in mcp-server/src/wire_format.rs (…
bolinfest Aug 14, 2025
2359878
add a timer to running exec commands (#2321)
nornagon-openai Aug 14, 2025
333803e
fix: ensure rust-ci always "runs" when a PR is submitted (#2324)
bolinfest Aug 15, 2025
afc377b
clear running commands in various places (#2325)
nornagon-openai Aug 15, 2025
e9b597c
Port login server to rust (#2294)
easong-openai Aug 15, 2025
c26d42a
Fix AF_UNIX, sockpair, recvfrom in linux sandbox (#2309)
wpt-oai Aug 15, 2025
dd63d61
fix: trying to simplify rust-ci.yml (#2327)
bolinfest Aug 15, 2025
8bdb452
AGENTS.md more strongly suggests running targeted tests first (#2306)
nornagon-openai Aug 15, 2025
a075424
Added `allow-expect-in-tests` / `allow-unwrap-in-tests` (#2328)
wpt-oai Aug 15, 2025
d0b907d
re-implement session id in status (#2332)
easong-openai Aug 15, 2025
76df073
Cleanup rust login server a bit more (#2331)
pakrym-oai Aug 15, 2025
5552688
Format multiline commands (#2333)
pakrym-oai Aug 15, 2025
917e298
tui: include optional full command line in history display (#2334)
nornagon-openai Aug 15, 2025
6df8e35
[tools] Add apply_patch tool (#2303)
dylan-hurd-oai Aug 15, 2025
26c8373
fix: tighten up checks against writable folders for SandboxPolicy (#2…
bolinfest Aug 15, 2025
6730592
fix: introduce MutexExt::lock_unchecked() so we stop ignoring unwrap(…
bolinfest Aug 15, 2025
265fd89
fix: try to fix flakiness in test_shell_command_approval_triggers_eli…
bolinfest Aug 15, 2025
45d6c74
tui: align diff display by always showing sign char and keeping fixed…
nornagon-openai Aug 15, 2025
13ed67c
feat: introduce TurnContext (#2343)
bolinfest Aug 15, 2025
17aa394
feat: introduce Op:UserTurn (#2329)
bolinfest Aug 15, 2025
eda50d8
feat: introduce ClientRequest::SendUserTurn (#2345)
bolinfest Aug 15, 2025
7c26c8e
tui: skip identical consecutive entries in local composer history (#2…
nornagon-openai Aug 15, 2025
d262244
fix: introduce codex-protocol crate (#2355)
bolinfest Aug 15, 2025
dcfdd2f
Fix #2296 Add "minimal" reasoning effort for GPT 5 models (#2326)
seratch Aug 15, 2025
c1156a8
Remove duplicated "Successfully logged in message" (#2357)
pakrym-oai Aug 15, 2025
1ad8ae2
color the status letter in apply patch summary (#2337)
nornagon-openai Aug 15, 2025
b31c503
chore: remove duplicated lockfile (#2336)
Brooooooklyn Aug 15, 2025
379106d
fix: include an entry for windows-x86_64 in the generated DotSlash fi…
bolinfest Aug 15, 2025
d3078b9
Show progress indicator for /diff command (#2245)
aibrahim-oai Aug 15, 2025
7a80d3c
replace /prompts with a rotating placeholder (#2314)
nornagon-openai Aug 16, 2025
1930ee7
Added launch profile for attaching to a running codex CLI process (#2…
etraut-openai Aug 16, 2025
350b00d
Added MCP server command to enable authentication using ChatGPT (#2373)
etraut-openai Aug 17, 2025
71cae06
fix: refactor login/src/server.rs so process_request() is a separate …
bolinfest Aug 17, 2025
b581498
fix: introduce EventMsg::TurnAborted (#2365)
bolinfest Aug 18, 2025
a269754
remove mcp-server/src/mcp_protocol.rs and the code that depends on it…
bolinfest Aug 18, 2025
5bce369
fix: clean up styles & colors and define in styles.md (#2401)
ae-openai Aug 18, 2025
be6a4fa
chore(deps-dev): bump @types/node from 24.2.1 to 24.3.0 in /.github/a…
dependabot[bot] Aug 18, 2025
da69d50
fix: stop using ANSI blue (#2421)
ae-openai Aug 18, 2025
712bfa0
chore: move mcp-server/src/wire_format.rs to protocol/src/mcp_protoco…
bolinfest Aug 18, 2025
a4f76bd
chore: add TS annotation to generated mcp-types (#2424)
bolinfest Aug 18, 2025
c9963b5
consolidate reasoning enums into one (#2428)
aibrahim-oai Aug 18, 2025
c283f9f
Add an operation to override current task context (#2431)
aibrahim-oai Aug 18, 2025
fc6cfd5
protocol-ts (#2425)
bolinfest Aug 18, 2025
ecb3880
Add cache tests for UserTurn (#2432)
aibrahim-oai Aug 18, 2025
db30a6f
Fix #2391 Add Ctrl+H as backspace keyboard shortcut (#2412)
seratch Aug 18, 2025
f9d3dde
chore(deps): bump anyhow from 1.0.98 to 1.0.99 in /codex-rs (#2405)
dependabot[bot] Aug 18, 2025
52f0b95
chore(deps): bump libc from 0.2.174 to 0.2.175 in /codex-rs (#2406)
dependabot[bot] Aug 18, 2025
37e5b08
chore: prefer returning Err to expect() (#2389)
bolinfest Aug 18, 2025
6e8c055
fix: async-ify login flow (#2393)
bolinfest Aug 19, 2025
38b84ff
chore(deps): bump clap from 4.5.43 to 4.5.45 in /codex-rs (#2404)
dependabot[bot] Aug 19, 2025
d58df28
fix: change `shutdown_flag` from `Arc<AtomicBool>` to `tokio::sync::N…
bolinfest Aug 19, 2025
5b1989f
Release zip archived binaries (#2438)
UnownPlain Aug 19, 2025
7f21634
fix: eliminate ServerOptions.login_timeout and have caller use tokio:…
bolinfest Aug 19, 2025
d5b42ba
fix: make ShutdownHandle a private field of LoginServer (#2396)
bolinfest Aug 19, 2025
146985f
fix: reduce references to Server in codex-login crate (#2398)
bolinfest Aug 19, 2025
2aad3a1
fix: remove shutdown_flag param to run_login_server() (#2399)
bolinfest Aug 19, 2025
f49c934
chore(deps): bump clap_complete from 4.5.56 to 4.5.57 in /codex-rs (#…
dependabot[bot] Aug 19, 2025
97f995a
Show login options when not signed in with ChatGPT (#2440)
aibrahim-oai Aug 19, 2025
096bca2
fix: exclude sysprompt etc from context left % (#2446)
ae-openai Aug 19, 2025
e7e5fe9
[tui] Support /mcp command (#2430)
dylan-hurd-oai Aug 19, 2025
16f11a8
Fix #2429 Tweak the cursor position after tab completion (#2442)
seratch Aug 19, 2025
7b4313b
fix: fix missing spacing in review decision response (#2457)
hansemannn Aug 19, 2025
9d3124c
tui: support Ghostty Ctrl-b/Ctrl-f fallback (#2427)
edverma Aug 19, 2025
8f54415
chore(deps): bump actions/checkout from 4 to 5 (#2407)
dependabot[bot] Aug 19, 2025
e91c3d6
Support changing reasoning effort (#2435)
aibrahim-oai Aug 19, 2025
783654e
feat: move session ID bullet in /status (#2462)
ae-openai Aug 19, 2025
1f5638b
docs: document writable_roots for sandbox_workspace_write (#2464)
bolinfest Aug 19, 2025
aafa00d
fix: prefer `cargo check` to `cargo build` to save time and space (#2…
bolinfest Aug 19, 2025
50c48e8
chore: upgrade to Rust 1.89 (#2465)
bolinfest Aug 19, 2025
e58125e
chore: Rust 1.89 promoted file locking to the standard library, so pr…
bolinfest Aug 19, 2025
0d66789
fix apply patch when only one file is rendered (#2468)
aibrahim-oai Aug 19, 2025
bc298e4
Fix: Sign in appear even if using other providers. (#2475)
aibrahim-oai Aug 19, 2025
17c98a7
Enable Dependabot updates for Rust toolchain (#2460)
JamieMagee Aug 20, 2025
77148a5
Diff command (#2476)
gpeal Aug 20, 2025
eaae56a
Client headers (#2487)
gpeal Aug 20, 2025
d1f1e36
Refresh ChatGPT auth token (#2484)
aibrahim-oai Aug 20, 2025
ce434b1
fix: prefer config var to env var (#2495)
bolinfest Aug 20, 2025
202af12
Add a slash command to control permissions (#2474)
aibrahim-oai Aug 20, 2025
ee8c4ad
feat: copy tweaks (#2502)
ae-openai Aug 20, 2025
0ad4e11
detect terminal and include in request headers (#2437)
nornagon-openai Aug 20, 2025
8481eb4
tui: tab-completing a command moves the cursor to the end (#2362)
nornagon-openai Aug 20, 2025
61bbabe
tui: switch to using tokio + EventStream for processing crossterm eve…
nornagon-openai Aug 20, 2025
1a1516a
[apply-patch] Fix applypatch for heredocs (#2477)
dylan-hurd-oai Aug 20, 2025
0d12380
refactor onboarding screen to a separate "app" (#2524)
nornagon-openai Aug 20, 2025
c579ae4
Fix login for internal employees (#2528)
aibrahim-oai Aug 20, 2025
250ae37
tui: link docs when no MCP servers configured (#2516)
ae-openai Aug 20, 2025
5ab30c7
fix: update build cache key in .github/workflows/codex.yml (#2534)
bolinfest Aug 20, 2025
050b9ba
Bridge command generation to powershell when on Windows (#2319)
eddy-win Aug 20, 2025
2ec5a28
add transcript mode (#2525)
nornagon-openai Aug 20, 2025
e95cad1
hide CoT by default; show headers in status indicator (#2316)
nornagon-openai Aug 20, 2025
9193eb6
show thinking in transcript (#2538)
nornagon-openai Aug 21, 2025
697b4ce
tui: show upgrade banner in history (#2537)
nornagon-openai Aug 21, 2025
dacff96
Added new auth-related methods and events to mcp server (#2496)
etraut-openai Aug 21, 2025
74683ba
Add a serde tag to ParsedItem (#2546)
gpeal Aug 21, 2025
d2b2a6d
[prompt] xml-format EnvironmentContext (#2272)
dylan-hurd-oai Aug 21, 2025
8ad56be
Parse and expose stream errors (#2540)
easong-openai Aug 21, 2025
5f6e1af
scroll instead of clear on boot (#2535)
nornagon-openai Aug 21, 2025
db934e4
read all AGENTS.md up to git root (#2532)
nornagon-openai Aug 21, 2025
9604671
tui: show diff hunk headers to separate sections (#2488)
nornagon-openai Aug 21, 2025
16d16a4
refactor: move slash command handling into chatwidget (#2536)
nornagon-openai Aug 21, 2025
4b4aa2a
tui: transcript mode updates live (#2562)
nornagon-openai Aug 21, 2025
24c7be7
Update README.md (#2564)
khai-oai Aug 21, 2025
5fac7b2
tweak thresholds for shimmer on non-true-color terminals (#2533)
nornagon-openai Aug 21, 2025
aaa7b9b
Merge remote-tracking branch 'upstream/main' into sync-upstream-20250…
austontroyer Aug 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/ISSUE_TEMPLATE/4-feature-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: 🎁 Feature Request
description: Propose a new feature for Codex
labels:
- enhancement
- needs triage
body:
- type: markdown
attributes:
value: |
Is Codex missing a feature that you'd like to see? Feel free to propose it here.

Before you submit a feature:
1. Search existing issues for similar features. If you find one, 👍 it rather than opening a new one.
2. The Codex team will try to balance the varying needs of the community when prioritizing or rejecting new features. Not all features will be accepted. See [Contributing](https://github.com/openai/codex#contributing) for more details.

- type: textarea
id: feature
attributes:
label: What feature would you like to see?
validations:
required: true
- type: textarea
id: author
attributes:
label: Are you interested in implementing this feature?
description: Please wait for acknowledgement before implementing or opening a PR.
- type: textarea
id: notes
attributes:
label: Additional information
description: Is there anything else you think we should know?
6 changes: 4 additions & 2 deletions .github/actions/codex/bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .github/actions/codex/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"devDependencies": {
"@types/bun": "^1.2.20",
"@types/node": "^24.2.1",
"@types/node": "^24.3.0",
"prettier": "^3.6.2",
"typescript": "^5.9.2"
}
Expand Down
4 changes: 4 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,7 @@ updates:
directory: /
schedule:
interval: weekly
- package-ecosystem: rust-toolchain
directory: codex-rs
schedule:
interval: weekly
4 changes: 4 additions & 0 deletions .github/dotslash-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
"linux-aarch64": {
"regex": "^codex-aarch64-unknown-linux-musl\\.zst$",
"path": "codex"
},
"windows-x86_64": {
"regex": "^codex-x86_64-pc-windows-msvc\\.exe\\.zst$",
"path": "codex.exe"
}
}
}
Expand Down
6 changes: 6 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# External (non-OpenAI) Pull Request Requirements

Before opening this Pull Request, please read the "Contributing" section of the README or your PR may be closed:
https://github.com/openai/codex#contributing

If your PR conforms to our contribution guidelines, replace this text with a detailed and high quality description of your changes.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
NODE_OPTIONS: --max-old-space-size=4096
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Setup Node.js
uses: actions/setup-node@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Annotate locations with typos
uses: codespell-project/codespell-problem-matcher@b80729f885d32f78a716c2f107b4db1025001c42 # v1
- name: Codespell
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/codex.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ jobs:
# Codex is not going to run.

- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5

- uses: dtolnay/rust-toolchain@1.88
- uses: dtolnay/rust-toolchain@1.89
with:
targets: x86_64-unknown-linux-gnu
components: clippy
Expand All @@ -52,7 +52,7 @@ jobs:
~/.cargo/registry/cache/
~/.cargo/git/db/
${{ github.workspace }}/codex-rs/target/
key: cargo-ubuntu-24.04-x86_64-unknown-linux-gnu-${{ hashFiles('**/Cargo.lock') }}
key: cargo-ubuntu-24.04-x86_64-unknown-linux-gnu-dev-${{ hashFiles('**/Cargo.lock') }}

# Note it is possible that the `verify` step internal to Run Codex will
# fail, in which case the work to setup the repo was worthless :(
Expand Down
127 changes: 95 additions & 32 deletions .github/workflows/rust-ci.yml
Original file line number Diff line number Diff line change
@@ -1,67 +1,93 @@
name: rust-ci
on:
pull_request:
branches:
- main
paths:
- "codex-rs/**"
- ".github/**"
pull_request: {}
push:
branches:
- main

workflow_dispatch:

# For CI, we build in debug (`--profile dev`) rather than release mode so we
# get signal faster.
# CI builds in debug (dev) for faster signal.

jobs:
# CI that don't need specific targets
# --- Detect what changed (always runs) -------------------------------------
changed:
name: Detect changed areas
runs-on: ubuntu-24.04
outputs:
codex: ${{ steps.detect.outputs.codex }}
workflows: ${{ steps.detect.outputs.workflows }}
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Detect changed paths (no external action)
id: detect
shell: bash
run: |
set -euo pipefail

if [[ "${{ github.event_name }}" == "pull_request" ]]; then
BASE_SHA='${{ github.event.pull_request.base.sha }}'
echo "Base SHA: $BASE_SHA"
# List files changed between base and current HEAD (merge-base aware)
mapfile -t files < <(git diff --name-only --no-renames "$BASE_SHA"...HEAD)
else
# On push / manual runs, default to running everything
files=("codex-rs/force" ".github/force")
fi

codex=false
workflows=false
for f in "${files[@]}"; do
[[ $f == codex-rs/* ]] && codex=true
[[ $f == .github/* ]] && workflows=true
done

echo "codex=$codex" >> "$GITHUB_OUTPUT"
echo "workflows=$workflows" >> "$GITHUB_OUTPUT"

# --- CI that doesn't need specific targets ---------------------------------
general:
name: Format / etc
runs-on: ubuntu-24.04
needs: changed
if: ${{ needs.changed.outputs.codex == 'true' || needs.changed.outputs.workflows == 'true' || github.event_name == 'push' }}
defaults:
run:
working-directory: codex-rs

steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@1.88
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@1.89
with:
components: rustfmt
- name: cargo fmt
run: cargo fmt -- --config imports_granularity=Item --check

# CI to validate on different os/targets
# --- CI to validate on different os/targets --------------------------------
lint_build_test:
name: ${{ matrix.runner }} - ${{ matrix.target }}${{ matrix.profile == 'release' && ' (release)' || '' }}
runs-on: ${{ matrix.runner }}
timeout-minutes: 30
needs: changed
# Keep job-level if to avoid spinning up runners when not needed
if: ${{ needs.changed.outputs.codex == 'true' || needs.changed.outputs.workflows == 'true' || github.event_name == 'push' }}
defaults:
run:
working-directory: codex-rs

strategy:
fail-fast: false
matrix:
# Note: While Codex CLI does not support Windows today, we include
# Windows in CI to ensure the code at least builds there.
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
Expand All @@ -75,9 +101,18 @@ jobs:
target: x86_64-pc-windows-msvc
profile: dev

# Also run representative release builds on Mac and Linux because
# there could be release-only build errors we want to catch.
- runner: macos-14
target: aarch64-apple-darwin
profile: release
- runner: ubuntu-24.04
target: x86_64-unknown-linux-musl
profile: release

steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@1.88
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@1.89
with:
targets: ${{ matrix.target }}
components: clippy
Expand All @@ -95,7 +130,7 @@ jobs:
- if: ${{ matrix.target == 'x86_64-unknown-linux-musl' || matrix.target == 'aarch64-unknown-linux-musl'}}
name: Install musl build tools
run: |
sudo apt install -y musl-tools pkg-config
sudo apt install -y musl-tools pkg-config && sudo rm -rf /var/lib/apt/lists/*

- name: cargo clippy
id: clippy
Expand All @@ -104,16 +139,20 @@ jobs:
# Running `cargo build` from the workspace root builds the workspace using
# the union of all features from third-party crates. This can mask errors
# where individual crates have underspecified features. To avoid this, we
# run `cargo build` for each crate individually, though because this is
# run `cargo check` for each crate individually, though because this is
# slower, we only do this for the x86_64-unknown-linux-gnu target.
- name: cargo build individual crates
id: build
if: ${{ matrix.target == 'x86_64-unknown-linux-gnu' }}
- name: cargo check individual crates
id: cargo_check_all_crates
if: ${{ matrix.target == 'x86_64-unknown-linux-gnu' && matrix.profile != 'release' }}
continue-on-error: true
run: find . -name Cargo.toml -mindepth 2 -maxdepth 2 -print0 | xargs -0 -n1 -I{} bash -c 'cd "$(dirname "{}")" && cargo build --profile ${{ matrix.profile }}'
run: |
find . -name Cargo.toml -mindepth 2 -maxdepth 2 -print0 \
| xargs -0 -n1 -I{} bash -c 'cd "$(dirname "{}")" && cargo check --profile ${{ matrix.profile }}'

- name: cargo test
id: test
# `cargo test` takes too long for release builds to run them on every PR
if: ${{ matrix.profile != 'release' }}
continue-on-error: true
run: cargo test --all-features --target ${{ matrix.target }} --profile ${{ matrix.profile }}
env:
Expand All @@ -123,8 +162,32 @@ jobs:
- name: verify all steps passed
if: |
steps.clippy.outcome == 'failure' ||
steps.build.outcome == 'failure' ||
steps.cargo_check_all_crates.outcome == 'failure' ||
steps.test.outcome == 'failure'
run: |
echo "One or more checks failed (clippy, build, or test). See logs for details."
echo "One or more checks failed (clippy, cargo_check_all_crates, or test). See logs for details."
exit 1

# --- Gatherer job that you mark as the ONLY required status -----------------
results:
name: CI results (required)
needs: [changed, general, lint_build_test]
if: always()
runs-on: ubuntu-24.04
steps:
- name: Summarize
shell: bash
run: |
echo "general: ${{ needs.general.result }}"
echo "matrix : ${{ needs.lint_build_test.result }}"

# If nothing relevant changed (PR touching only root README, etc.),
# declare success regardless of other jobs.
if [[ '${{ needs.changed.outputs.codex }}' != 'true' && '${{ needs.changed.outputs.workflows }}' != 'true' && '${{ github.event_name }}' != 'push' ]]; then
echo 'No relevant changes -> CI not required.'
exit 0
fi

# Otherwise require the jobs to have succeeded
[[ '${{ needs.general.result }}' == 'success' ]] || { echo 'general failed'; exit 1; }
[[ '${{ needs.lint_build_test.result }}' == 'success' ]] || { echo 'matrix failed'; exit 1; }
Loading
Loading