Skip to content

Commit 9fad97e

Browse files
committed
Merge upstream main into Codex Infinity
2 parents ff047c0 + 5c20513 commit 9fad97e

105 files changed

Lines changed: 5012 additions & 334 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,20 @@
1-
name: setup-rusty-v8-musl
2-
description: Download and verify musl rusty_v8 artifacts for Cargo builds.
1+
name: setup-rusty-v8
2+
description: Download and verify Codex-built rusty_v8 artifacts for Cargo builds.
33
inputs:
44
target:
5-
description: Rust musl target triple.
5+
description: Rust target triple with Codex-built V8 release artifacts.
66
required: true
77

88
runs:
99
using: composite
1010
steps:
11-
- name: Configure musl rusty_v8 artifact overrides and verify checksums
11+
- name: Configure rusty_v8 artifact overrides and verify checksums
1212
shell: bash
1313
env:
1414
TARGET: ${{ inputs.target }}
1515
run: |
1616
set -euo pipefail
1717
18-
case "${TARGET}" in
19-
x86_64-unknown-linux-musl|aarch64-unknown-linux-musl)
20-
;;
21-
*)
22-
echo "Unsupported musl rusty_v8 target: ${TARGET}" >&2
23-
exit 1
24-
;;
25-
esac
26-
2718
version="$(python3 "${GITHUB_WORKSPACE}/.github/scripts/rusty_v8_bazel.py" resolved-v8-crate-version)"
2819
release_tag="rusty-v8-v${version}"
2920
base_url="https://github.com/openai/codex/releases/download/${release_tag}"
@@ -42,6 +33,10 @@ runs:
4233
exit 1
4334
fi
4435
45-
(cd "${binding_dir}" && sha256sum -c "${checksums_path}")
36+
if command -v sha256sum >/dev/null 2>&1; then
37+
(cd "${binding_dir}" && sha256sum -c "${checksums_path}")
38+
else
39+
(cd "${binding_dir}" && shasum -a 256 -c "${checksums_path}")
40+
fi
4641
echo "RUSTY_V8_ARCHIVE=${archive_path}" >> "${GITHUB_ENV}"
4742
echo "RUSTY_V8_SRC_BINDING_PATH=${binding_path}" >> "${GITHUB_ENV}"

.github/dotslash-zsh-config.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
"format": "tar.gz",
88
"path": "codex-zsh/bin/zsh"
99
},
10+
"macos-x86_64": {
11+
"name": "codex-zsh-x86_64-apple-darwin.tar.gz",
12+
"format": "tar.gz",
13+
"path": "codex-zsh/bin/zsh"
14+
},
1015
"linux-x86_64": {
1116
"name": "codex-zsh-x86_64-unknown-linux-musl.tar.gz",
1217
"format": "tar.gz",

.github/workflows/ci.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ jobs:
2323
- name: Verify Bazel clippy flags match Cargo workspace lints
2424
run: python3 .github/scripts/verify_bazel_clippy_lints.py
2525

26+
- name: Test Codex package builder
27+
run: python3 -m unittest discover -s scripts/codex_package -p 'test_*.py'
28+
2629
- name: Setup pnpm
2730
uses: pnpm/action-setup@a8198c4bff370c8506180b035930dea56dbd5288 # v5
2831
with:
@@ -36,9 +39,6 @@ jobs:
3639
- name: Install dependencies
3740
run: pnpm install --frozen-lockfile
3841

39-
# stage_npm_packages.py requires DotSlash when staging releases.
40-
- uses: facebook/install-dotslash@1e4e7b3e07eaca387acb98f1d4720e0bee8dbb6a # v2
41-
4242
- name: Stage npm package
4343
id: stage_npm_package
4444
env:
@@ -49,8 +49,8 @@ jobs:
4949
# cross-platform native payload required by the npm package layout.
5050
# Passing the workflow URL directly avoids relying on old rust-v*
5151
# branches remaining discoverable via `gh run list --branch ...`.
52-
CODEX_VERSION=0.125.0
53-
WORKFLOW_URL="https://github.com/openai/codex/actions/runs/26131514935"
52+
CODEX_VERSION=0.133.0-alpha.4
53+
WORKFLOW_URL="https://github.com/openai/codex/actions/runs/26201494185"
5454
OUTPUT_DIR="${RUNNER_TEMP}"
5555
python3 ./scripts/stage_npm_packages.py \
5656
--release-version "$CODEX_VERSION" \

.github/workflows/rust-ci-full.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,13 @@ jobs:
2121
- uses: dtolnay/rust-toolchain@a0b273b48ed29de4470960879e8381ff45632f26 # 1.93.0
2222
with:
2323
components: rustfmt
24+
- uses: taiki-e/install-action@44c6d64aa62cd779e873306675c7a58e86d6d532 # v2.62.49
25+
with:
26+
tool: just
2427
- name: cargo fmt
2528
run: cargo fmt -- --config imports_granularity=Item --check
29+
- name: Rust benchmark smoke test
30+
run: just bench-smoke
2631

2732
cargo_shear:
2833
name: cargo shear
@@ -422,9 +427,9 @@ jobs:
422427
echo "CFLAGS=${cflags}" >> "$GITHUB_ENV"
423428
echo "CXXFLAGS=${cxxflags}" >> "$GITHUB_ENV"
424429
425-
- if: ${{ matrix.target == 'x86_64-unknown-linux-musl' || matrix.target == 'aarch64-unknown-linux-musl' }}
426-
name: Configure musl rusty_v8 artifact overrides and verify checksums
427-
uses: ./.github/actions/setup-rusty-v8-musl
430+
- if: ${{ !contains(matrix.target, 'windows') }}
431+
name: Configure rusty_v8 artifact overrides and verify checksums
432+
uses: ./.github/actions/setup-rusty-v8
428433
with:
429434
target: ${{ matrix.target }}
430435

.github/workflows/rust-ci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,13 @@ jobs:
6565
- uses: dtolnay/rust-toolchain@a0b273b48ed29de4470960879e8381ff45632f26 # 1.93.0
6666
with:
6767
components: rustfmt
68+
- uses: taiki-e/install-action@44c6d64aa62cd779e873306675c7a58e86d6d532 # v2.62.49
69+
with:
70+
tool: just
6871
- name: cargo fmt
6972
run: cargo fmt -- --config imports_granularity=Item --check
73+
- name: Rust benchmark smoke test
74+
run: just bench-smoke
7075

7176
cargo_shear:
7277
name: cargo shear

.github/workflows/rust-release-windows.yml

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,114 @@ jobs:
217217
- name: Install DotSlash
218218
uses: facebook/install-dotslash@1e4e7b3e07eaca387acb98f1d4720e0bee8dbb6a # v2
219219

220+
<<<<<<< HEAD
221+
||||||| 60b45d92d9
222+
- name: Build Codex package archives
223+
shell: bash
224+
run: |
225+
set -euo pipefail
226+
for bundle in primary app-server; do
227+
bash "${GITHUB_WORKSPACE}/.github/scripts/build-codex-package-archive.sh" \
228+
--target "${{ matrix.target }}" \
229+
--bundle "$bundle" \
230+
--entrypoint-dir "target/${{ matrix.target }}/release" \
231+
--archive-dir "dist/${{ matrix.target }}"
232+
done
233+
234+
- name: Build Python runtime wheel
235+
shell: bash
236+
run: |
237+
set -euo pipefail
238+
239+
case "${{ matrix.target }}" in
240+
aarch64-pc-windows-msvc)
241+
platform_tag="win_arm64"
242+
;;
243+
x86_64-pc-windows-msvc)
244+
platform_tag="win_amd64"
245+
;;
246+
*)
247+
echo "No Python runtime wheel platform tag for ${{ matrix.target }}"
248+
exit 1
249+
;;
250+
esac
251+
252+
python -m venv "${RUNNER_TEMP}/python-runtime-build-venv"
253+
"${RUNNER_TEMP}/python-runtime-build-venv/Scripts/python.exe" -m pip install build
254+
255+
stage_dir="${RUNNER_TEMP}/openai-codex-cli-bin-${{ matrix.target }}"
256+
wheel_dir="${GITHUB_WORKSPACE}/python-runtime-dist/${{ matrix.target }}"
257+
# Keep the helpers next to codex.exe in the runtime wheel so Windows
258+
# sandbox/elevation lookup matches the standalone release zip.
259+
python "${GITHUB_WORKSPACE}/sdk/python/scripts/update_sdk_artifacts.py" \
260+
stage-runtime \
261+
"$stage_dir" \
262+
"${GITHUB_WORKSPACE}/codex-rs/target/${{ matrix.target }}/release/codex.exe" \
263+
--codex-version "${GITHUB_REF_NAME}" \
264+
--platform-tag "$platform_tag" \
265+
--resource-binary "${GITHUB_WORKSPACE}/codex-rs/target/${{ matrix.target }}/release/codex-command-runner.exe" \
266+
--resource-binary "${GITHUB_WORKSPACE}/codex-rs/target/${{ matrix.target }}/release/codex-windows-sandbox-setup.exe"
267+
"${RUNNER_TEMP}/python-runtime-build-venv/Scripts/python.exe" -m build --wheel --outdir "$wheel_dir" "$stage_dir"
268+
269+
- name: Upload Python runtime wheel
270+
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
271+
with:
272+
name: python-runtime-wheel-${{ matrix.target }}
273+
path: python-runtime-dist/${{ matrix.target }}/*.whl
274+
if-no-files-found: error
275+
276+
=======
277+
- name: Build Codex package archives
278+
shell: bash
279+
run: |
280+
set -euo pipefail
281+
for bundle in primary app-server; do
282+
bash "${GITHUB_WORKSPACE}/.github/scripts/build-codex-package-archive.sh" \
283+
--target "${{ matrix.target }}" \
284+
--bundle "$bundle" \
285+
--entrypoint-dir "target/${{ matrix.target }}/release" \
286+
--archive-dir "dist/${{ matrix.target }}"
287+
done
288+
289+
- name: Build Python runtime wheel
290+
shell: bash
291+
run: |
292+
set -euo pipefail
293+
294+
case "${{ matrix.target }}" in
295+
aarch64-pc-windows-msvc)
296+
platform_tag="win_arm64"
297+
;;
298+
x86_64-pc-windows-msvc)
299+
platform_tag="win_amd64"
300+
;;
301+
*)
302+
echo "No Python runtime wheel platform tag for ${{ matrix.target }}"
303+
exit 1
304+
;;
305+
esac
306+
307+
python -m venv "${RUNNER_TEMP}/python-runtime-build-venv"
308+
"${RUNNER_TEMP}/python-runtime-build-venv/Scripts/python.exe" -m pip install build
309+
310+
stage_dir="${RUNNER_TEMP}/openai-codex-cli-bin-${{ matrix.target }}"
311+
wheel_dir="${GITHUB_WORKSPACE}/python-runtime-dist/${{ matrix.target }}"
312+
python "${GITHUB_WORKSPACE}/sdk/python/scripts/update_sdk_artifacts.py" \
313+
stage-runtime \
314+
"$stage_dir" \
315+
"dist/${{ matrix.target }}/codex-package-${{ matrix.target }}.tar.gz" \
316+
--codex-version "${GITHUB_REF_NAME}" \
317+
--platform-tag "$platform_tag"
318+
"${RUNNER_TEMP}/python-runtime-build-venv/Scripts/python.exe" -m build --wheel --outdir "$wheel_dir" "$stage_dir"
319+
320+
- name: Upload Python runtime wheel
321+
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
322+
with:
323+
name: python-runtime-wheel-${{ matrix.target }}
324+
path: python-runtime-dist/${{ matrix.target }}/*.whl
325+
if-no-files-found: error
326+
327+
>>>>>>> upstream/main
220328
- name: Compress artifacts
221329
shell: bash
222330
run: |

.github/workflows/rust-release-zsh.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ jobs:
6767
fail-fast: false
6868
matrix:
6969
include:
70+
- runner: macos-15-large
71+
target: x86_64-apple-darwin
72+
variant: macos-15
73+
archive_name: codex-zsh-x86_64-apple-darwin.tar.gz
7074
- runner: macos-15-xlarge
7175
target: aarch64-apple-darwin
7276
variant: macos-15

0 commit comments

Comments
 (0)