Skip to content

armgit / codex

Public Imported from GitHub
0

Lightweight coding agent that runs in your terminal

Rust

feat: build codex-responses-api-proxy for all platforms as part of the GitHub Release (#4406)

Michael Bolinff6dbff0b64b
diff --git a/.github/dotslash-config.json b/.github/dotslash-config.json
index 8566e03490..5e28cdf207 100644
--- a/.github/dotslash-config.json
+++ b/.github/dotslash-config.json
@@ -27,6 +27,34 @@
"path": "codex.exe"
}
}
+ },
+ "codex-responses-api-proxy": {
+ "platforms": {
+ "macos-aarch64": {
+ "regex": "^codex-responses-api-proxy-aarch64-apple-darwin\\.zst$",
+ "path": "codex-responses-api-proxy"
+ },
+ "macos-x86_64": {
+ "regex": "^codex-responses-api-proxy-x86_64-apple-darwin\\.zst$",
+ "path": "codex-responses-api-proxy"
+ },
+ "linux-x86_64": {
+ "regex": "^codex-responses-api-proxy-x86_64-unknown-linux-musl\\.zst$",
+ "path": "codex-responses-api-proxy"
+ },
+ "linux-aarch64": {
+ "regex": "^codex-responses-api-proxy-aarch64-unknown-linux-musl\\.zst$",
+ "path": "codex-responses-api-proxy"
+ },
+ "windows-x86_64": {
+ "regex": "^codex-responses-api-proxy-x86_64-pc-windows-msvc\\.exe\\.zst$",
+ "path": "codex-responses-api-proxy.exe"
+ },
+ "windows-aarch64": {
+ "regex": "^codex-responses-api-proxy-aarch64-pc-windows-msvc\\.exe\\.zst$",
+ "path": "codex-responses-api-proxy.exe"
+ }
+ }
}
}
}
diff --git a/.github/workflows/rust-release.yml b/.github/workflows/rust-release.yml
index c808216d96..345fd091a7 100644
--- a/.github/workflows/rust-release.yml
+++ b/.github/workflows/rust-release.yml
@@ -97,7 +97,7 @@ jobs:
sudo apt install -y musl-tools pkg-config
- name: Cargo build
- run: cargo build --target ${{ matrix.target }} --release --bin codex
+ run: cargo build --target ${{ matrix.target }} --release --bin codex --bin codex-responses-api-proxy
- name: Stage artifacts
shell: bash
@@ -107,8 +107,10 @@ jobs:
if [[ "${{ matrix.runner }}" == windows* ]]; then
cp target/${{ matrix.target }}/release/codex.exe "$dest/codex-${{ matrix.target }}.exe"
+ cp target/${{ matrix.target }}/release/codex-responses-api-proxy.exe "$dest/codex-responses-api-proxy-${{ matrix.target }}.exe"
else
cp target/${{ matrix.target }}/release/codex "$dest/codex-${{ matrix.target }}"
+ cp target/${{ matrix.target }}/release/codex-responses-api-proxy "$dest/codex-responses-api-proxy-${{ matrix.target }}"
fi
- if: ${{ matrix.runner == 'windows-11-arm' }}
diff --git a/codex-cli/scripts/build_npm_package.py b/codex-cli/scripts/build_npm_package.py
index 0401f10385..bedb1c2438 100755
--- a/codex-cli/scripts/build_npm_package.py
+++ b/codex-cli/scripts/build_npm_package.py
@@ -158,11 +158,8 @@ def stage_sources(staging_dir: Path, version: str) -> None:
out.write("\n")
-def install_native_binaries(staging_dir: Path, workflow_url: str | None) -> None:
- cmd = ["./scripts/install_native_deps.py"]
- if workflow_url:
- cmd.extend(["--workflow-url", workflow_url])
- cmd.append(str(staging_dir))
+def install_native_binaries(staging_dir: Path, workflow_url: str) -> None:
+ cmd = ["./scripts/install_native_deps.py", "--workflow-url", workflow_url, str(staging_dir)]
subprocess.check_call(cmd, cwd=CODEX_CLI_ROOT)