Skip to content

Commit 8a26ea0

Browse files
authored
fix: stop building codex-exec and codex-linux-sandbox binaries (openai#2036)
Release builds are taking awhile and part of the reason that we are building binaries that we are not really using. Adding Windows binaries into releases (openai#2035) slows things down, so we need to get some time back. - `codex-exec` is basically a standalone `codex exec` that we were offering because it's a bit smaller as it does not include all the bits to power the TUI. We were using it in our experimental GitHub Action, so this PR updates the Action to use `codex exec` instead. - `codex-linux-sandbox` was a helper binary for the TypeScript version of the CLI, but I am about to axe that, so we don't need this either. If we decide to bring `codex-exec` back at some point, we should use a separate instances so we can build it in parallel with `codex`. (I think if we had beefier build machines, this wouldn't be so bad, but that's not the case with the default runners from GitHub.)
1 parent 18eb157 commit 8a26ea0

File tree

4 files changed

+25
-42
lines changed

4 files changed

+25
-42
lines changed

.github/actions/codex/action.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,20 +82,18 @@ runs:
8282
8383
# Note that if we start baking version numbers into the artifact name,
8484
# we will need to update this action.yml file to match.
85-
artifact="codex-exec-${triple}.tar.gz"
85+
artifact="codex-${triple}.tar.gz"
8686
8787
TAG_ARG="${{ inputs.codex_release_tag }}"
8888
# The usage is `gh release download [<tag>] [flags]`, so if TAG_ARG
8989
# is empty, we do not pass it so we can default to the latest release.
9090
gh release download ${TAG_ARG:+$TAG_ARG} --repo openai/codex \
9191
--pattern "$artifact" --output - \
92-
| tar xzO > /usr/local/bin/codex-exec
93-
chmod +x /usr/local/bin/codex-exec
92+
| tar xzO > /usr/local/bin/codex
93+
chmod +x /usr/local/bin/codex
9494
95-
# Display Codex version to confirm binary integrity; ensure we point it
96-
# at the checked-out repository via --cd so that any subsequent commands
97-
# use the correct working directory.
98-
codex-exec --cd "$GITHUB_WORKSPACE" --version
95+
# Display Codex version to confirm binary integrity.
96+
codex --version
9997
10098
- name: Install Bun
10199
uses: oven-sh/setup-bun@v2

.github/actions/codex/src/run-codex.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ export async function runCodex(
1818
const tempDirPath = await mkdtemp(join(tmpdir(), "codex-"));
1919
const lastMessageOutput = join(tempDirPath, "codex-prompt.md");
2020

21-
const args = ["/usr/local/bin/codex-exec"];
21+
// Use the unified CLI and its `exec` subcommand instead of the old
22+
// standalone `codex-exec` binary.
23+
const args = ["/usr/local/bin/codex", "exec"];
2224

2325
const inputCodexArgs = ctx.tryGet("INPUT_CODEX_ARGS")?.trim();
2426
if (inputCodexArgs) {

.github/dotslash-config.json

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,23 @@
11
{
22
"outputs": {
3-
"codex-exec": {
4-
"platforms": {
5-
"macos-aarch64": { "regex": "^codex-exec-aarch64-apple-darwin\\.zst$", "path": "codex-exec" },
6-
"macos-x86_64": { "regex": "^codex-exec-x86_64-apple-darwin\\.zst$", "path": "codex-exec" },
7-
"linux-x86_64": { "regex": "^codex-exec-x86_64-unknown-linux-musl\\.zst$", "path": "codex-exec" },
8-
"linux-aarch64": { "regex": "^codex-exec-aarch64-unknown-linux-musl\\.zst$", "path": "codex-exec" }
9-
}
10-
},
11-
123
"codex": {
134
"platforms": {
14-
"macos-aarch64": { "regex": "^codex-aarch64-apple-darwin\\.zst$", "path": "codex" },
15-
"macos-x86_64": { "regex": "^codex-x86_64-apple-darwin\\.zst$", "path": "codex" },
16-
"linux-x86_64": { "regex": "^codex-x86_64-unknown-linux-musl\\.zst$", "path": "codex" },
17-
"linux-aarch64": { "regex": "^codex-aarch64-unknown-linux-musl\\.zst$", "path": "codex" }
18-
}
19-
},
20-
21-
"codex-linux-sandbox": {
22-
"platforms": {
23-
"linux-x86_64": { "regex": "^codex-linux-sandbox-x86_64-unknown-linux-musl\\.zst$", "path": "codex-linux-sandbox" },
24-
"linux-aarch64": { "regex": "^codex-linux-sandbox-aarch64-unknown-linux-musl\\.zst$", "path": "codex-linux-sandbox" }
5+
"macos-aarch64": {
6+
"regex": "^codex-aarch64-apple-darwin\\.zst$",
7+
"path": "codex"
8+
},
9+
"macos-x86_64": {
10+
"regex": "^codex-x86_64-apple-darwin\\.zst$",
11+
"path": "codex"
12+
},
13+
"linux-x86_64": {
14+
"regex": "^codex-x86_64-unknown-linux-musl\\.zst$",
15+
"path": "codex"
16+
},
17+
"linux-aarch64": {
18+
"regex": "^codex-aarch64-unknown-linux-musl\\.zst$",
19+
"path": "codex"
20+
}
2521
}
2622
}
2723
}

.github/workflows/rust-release.yml

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ jobs:
9595
sudo apt install -y musl-tools pkg-config
9696
9797
- name: Cargo build
98-
run: cargo build --target ${{ matrix.target }} --release --bin codex --bin codex-exec --bin codex-linux-sandbox
98+
run: cargo build --target ${{ matrix.target }} --release --bin codex
9999

100100
- name: Stage artifacts
101101
shell: bash
@@ -104,23 +104,11 @@ jobs:
104104
mkdir -p "$dest"
105105
106106
if [[ "${{ matrix.runner }}" == windows* ]]; then
107-
cp target/${{ matrix.target }}/release/codex-exec.exe "$dest/codex-exec-${{ matrix.target }}.exe"
108107
cp target/${{ matrix.target }}/release/codex.exe "$dest/codex-${{ matrix.target }}.exe"
109108
else
110-
cp target/${{ matrix.target }}/release/codex-exec "$dest/codex-exec-${{ matrix.target }}"
111109
cp target/${{ matrix.target }}/release/codex "$dest/codex-${{ matrix.target }}"
112110
fi
113111
114-
# After https://github.com/openai/codex/pull/1228 is merged and a new
115-
# release is cut with an artifacts built after that PR, the `-gnu`
116-
# variants can go away as we will only use the `-musl` variants.
117-
- if: ${{ matrix.target == 'x86_64-unknown-linux-musl' || matrix.target == 'x86_64-unknown-linux-gnu' || matrix.target == 'aarch64-unknown-linux-gnu' || matrix.target == 'aarch64-unknown-linux-musl' }}
118-
name: Stage Linux-only artifacts
119-
shell: bash
120-
run: |
121-
dest="dist/${{ matrix.target }}"
122-
cp target/${{ matrix.target }}/release/codex-linux-sandbox "$dest/codex-linux-sandbox-${{ matrix.target }}"
123-
124112
- name: Compress artifacts
125113
shell: bash
126114
run: |
@@ -133,7 +121,6 @@ jobs:
133121
# we publish. The end result is:
134122
# codex-<target>.zst (existing)
135123
# codex-<target>.tar.gz (new)
136-
# ...same naming for codex-exec-* and codex-linux-sandbox-*
137124
138125
# 1. Produce a .tar.gz for every file in the directory *before* we
139126
# run `zstd --rm`, because that flag deletes the original files.

0 commit comments

Comments
 (0)