Enable BuildBuddy for voice release builds (#54737)

## What changed

Pass `BUILDBUDDY_API_KEY` to Linux, macOS, and Windows voice release builds, and give the dedicated macOS and Windows voice jobs access to the `bazel` environment without creating deployments.

Use the shared Bazel preparation action and BuildBuddy wrapper for Linux and macOS voice builds so they inherit the existing repository cache and remote cache configuration.

GitOrigin-RevId: 52cdf05bc4567f3e8c460d2509e57bb30e667868
This commit is contained in:
Adam Perry @ OpenAI
2026-10-16 23:44:37 +00:00
committed by copyberry
parent 221e4e7c05
commit 835d3049f0
2 changed files with 19 additions and 13 deletions
+4 -1
View File
@@ -179,6 +179,9 @@ jobs:
build-windows-voice:
name: Build Windows voice - ${{ matrix.target }}
runs-on: ${{ matrix.runs_on }}
environment:
name: bazel
deployment: false
timeout-minutes: 120
permissions:
contents: read
@@ -250,7 +253,7 @@ jobs:
env:
ARCH: ${{ matrix.arch }}
VOICE_ARCH: ${{ matrix.arch }}
BUILDBUDDY_API_KEY: ""
BUILDBUDDY_API_KEY: ${{ secrets.BUILDBUDDY_API_KEY }}
run: |
(cd codex-rs && cargo update --workspace)
python .github/scripts/watch_voice_bazel.py "$(cygpath -w "$BASH")" ./.github/scripts/run-bazel-ci.sh \
+15 -12
View File
@@ -268,8 +268,8 @@ jobs:
export STABLE_GIT_COMMIT
cargo build --target "$target" --release --timings "${build_args[@]}"
- name: Prepare Bazel release build
if: ${{ matrix.build-system == 'bazel' }}
- name: Prepare Bazel for release binaries or Linux voice
if: matrix.build-system == 'bazel' || (matrix.bundle == 'primary' && contains(matrix.target, 'linux'))
uses: ./.github/actions/prepare-bazel-ci
with:
target: ${{ matrix.target }}
@@ -322,17 +322,12 @@ jobs:
path: codex-rs/symbols-dist/${{ matrix.artifact_name }}/*
if-no-files-found: error
- name: Set up Bazel for Linux voice
if: ${{ matrix.bundle == 'primary' && contains(matrix.target, 'linux') }}
uses: bazel-contrib/setup-bazel@c5acdfb288317d0b5c0bbd7a396a3dc868bb0f86 # 0.19.0
with:
bazelisk-version: 1.28.1
- name: Build Linux voice runtime
if: ${{ matrix.bundle == 'primary' && contains(matrix.target, 'linux') }}
shell: bash
env:
APP_TARGET: ${{ matrix.target }}
BUILDBUDDY_API_KEY: ${{ secrets.BUILDBUDDY_API_KEY }}
run: |
set -euo pipefail
cd "$GITHUB_WORKSPACE"
@@ -342,7 +337,8 @@ jobs:
x86_64-unknown-linux-gnu) prefix=linux_x86_64 ;;
*) exit 1 ;;
esac
bazel build --config=release //codex-rs/voice-host:codex-voice-host //third_party/voice:native_runtime
python3 .github/scripts/run_bazel_with_buildbuddy.py build --config=release \
//codex-rs/voice-host:codex-voice-host //third_party/voice:native_runtime
source="bazel-bin/third_party/voice/native_runtime_${prefix}"
output="${RUNNER_TEMP}/signed-voice/${APP_TARGET}"
mkdir -p "$output"
@@ -575,6 +571,9 @@ jobs:
needs: tag-check
name: Build voice runtime - ${{ matrix.target }}
runs-on: ${{ matrix.runner }}
environment:
name: bazel
deployment: false
timeout-minutes: 120
permissions:
contents: read
@@ -595,20 +594,24 @@ jobs:
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: "3.12"
- uses: bazel-contrib/setup-bazel@c5acdfb288317d0b5c0bbd7a396a3dc868bb0f86 # 0.19.0
- name: Prepare Bazel CI
uses: ./.github/actions/prepare-bazel-ci
with:
bazelisk-version: 1.28.1
target: ${{ matrix.target }}
cache-scope: bazel-release-primary
- name: Build matching helper and native runtime
shell: bash
env:
TARGET: ${{ matrix.target }}
PREFIX: ${{ matrix.prefix }}
BUILDBUDDY_API_KEY: ${{ secrets.BUILDBUDDY_API_KEY }}
run: |
set -euo pipefail
# Release tags bump Cargo.toml without rewriting the workspace lockfile.
# Refresh workspace versions before Bazel reads the Cargo dependency graph.
(cd codex-rs && cargo update --workspace)
bazel build --config=release --macos_minimum_os=14.0 //codex-rs/voice-host:codex-voice-host //third_party/voice:native_runtime
python3 .github/scripts/run_bazel_with_buildbuddy.py build --config=release \
--macos_minimum_os=14.0 //codex-rs/voice-host:codex-voice-host //third_party/voice:native_runtime
runtime="bazel-bin/third_party/voice/native_runtime_${PREFIX}"
PYTHONPATH=third_party/voice python3 - "$runtime" "$TARGET" <<'PY'
from pathlib import Path