mirror of
https://github.com/openai/codex.git
synced 2026-11-25 23:30:49 +00:00
Bundle the Statsig client key in release builds (#64016)
## Why Codex needs a non-empty client key at compile time to use Statsig gates when the feature is enabled. ## What changed Set `CODEX_BUNDLED_STATSIG_CLIENT_KEY` from the `CODEX_STATSIG_CLIENT_KEY` GitHub Actions variable in the Cargo and Bazel build steps of both release workflows. The shared Bazel action forwards the key to Rust compilation when the value is non-empty. GitOrigin-RevId: 90ad3471417bc030acf90836d3fd0c24d35feffe
This commit is contained in:
@@ -37,6 +37,7 @@ runs:
|
||||
${{ runner.os == 'Windows' && '--windows-msvc-host-platform' || '' }} -- build \
|
||||
${{ runner.os == 'macOS' && '--config=ci-macos --remote_download_toplevel' || '' }} \
|
||||
"--platforms=@rules_rs//rs/platforms:$TARGET" \
|
||||
${CODEX_BUNDLED_STATSIG_CLIENT_KEY:+"--@rules_rust//rust/settings:extra_rustc_env=CODEX_BUNDLED_STATSIG_CLIENT_KEY=$CODEX_BUNDLED_STATSIG_CLIENT_KEY"} \
|
||||
"--//codex-rs:runtime_package_build_mode=$BUILD_MODE" \
|
||||
-- "//codex-rs:runtime_package_$BUNDLE"
|
||||
|
||||
|
||||
@@ -138,6 +138,8 @@ jobs:
|
||||
- name: Build Bazel release binaries and symbols
|
||||
if: ${{ matrix.build-system == 'bazel' }}
|
||||
uses: ./.github/actions/build-bazel-release
|
||||
env:
|
||||
CODEX_BUNDLED_STATSIG_CLIENT_KEY: ${{ vars.CODEX_STATSIG_CLIENT_KEY }}
|
||||
with:
|
||||
target: ${{ matrix.target }}
|
||||
bundle: ${{ matrix.bundle }}
|
||||
@@ -146,6 +148,8 @@ jobs:
|
||||
- name: Cargo build (Windows binaries)
|
||||
if: ${{ matrix.build-system == 'cargo' }}
|
||||
shell: bash
|
||||
env:
|
||||
CODEX_BUNDLED_STATSIG_CLIENT_KEY: ${{ vars.CODEX_STATSIG_CLIENT_KEY }}
|
||||
run: |
|
||||
target="${{ matrix.target }}"
|
||||
if [[ "$target" == "x86_64-pc-windows-msvc" ]]; then
|
||||
|
||||
@@ -260,6 +260,8 @@ jobs:
|
||||
- name: Cargo build
|
||||
if: ${{ matrix.build-system == 'cargo' }}
|
||||
shell: bash
|
||||
env:
|
||||
CODEX_BUNDLED_STATSIG_CLIENT_KEY: ${{ vars.CODEX_STATSIG_CLIENT_KEY }}
|
||||
run: |
|
||||
target="${{ matrix.target }}"
|
||||
build_args=()
|
||||
@@ -285,6 +287,8 @@ jobs:
|
||||
- name: Build Bazel release binaries and symbols
|
||||
if: ${{ matrix.build-system == 'bazel' }}
|
||||
uses: ./.github/actions/build-bazel-release
|
||||
env:
|
||||
CODEX_BUNDLED_STATSIG_CLIENT_KEY: ${{ vars.CODEX_STATSIG_CLIENT_KEY }}
|
||||
with:
|
||||
target: ${{ matrix.target }}
|
||||
bundle: ${{ matrix.bundle }}
|
||||
|
||||
Reference in New Issue
Block a user