mirror of
https://github.com/openai/codex.git
synced 2026-11-14 21:40:39 +00:00
## What changed - Authenticate eligible protected `main` runs and Rust release tags with GitHub OIDC. Allow cache uploads only on `main` pushes; use read-only access for manual runs and release tags, and leave pull requests without GCS credentials. - Rename the shared wrapper to `.github/scripts/run_bazel.py` and route Bazel callers through it. Disable the disk cache in GitHub Actions and default macOS GCS connections to 20 while respecting explicit limits. - Gate additional Bazel release artifacts on `CODEX_BAZEL_RELEASES` and cache configuration, sharing the selected build systems across building, signing, and packaging. Keep Cargo as the default and prepare native Windows dependencies for Bazel releases. - Add a `Bazel result` check for the full workflow and extend Bazel job timeouts. ## Testing Add wrapper tests for cache access by event, argument preservation, and macOS connection limits. The wrapper test suite passes. GitOrigin-RevId: d85edbd083acfaa8bafaa8fd5241daed3e9ef871
52 lines
1.9 KiB
YAML
52 lines
1.9 KiB
YAML
name: Build Bazel release staging archive
|
|
description: Build a binary/symbol archive and extract writable inputs for existing signing and packaging.
|
|
inputs:
|
|
target:
|
|
description: Rust release target triple.
|
|
required: true
|
|
bundle:
|
|
description: Binary bundle (combined, primary, app-server, or helpers).
|
|
default: combined
|
|
release-dir:
|
|
description: Directory where the archive is extracted for signing and packaging.
|
|
required: true
|
|
build-mode:
|
|
description: Release optimizations, or debug for faster package smoke builds.
|
|
default: release
|
|
|
|
runs:
|
|
using: composite
|
|
steps:
|
|
- name: Refresh release workspace metadata
|
|
shell: bash
|
|
working-directory: ${{ github.workspace }}/codex-rs
|
|
# Release tags change Cargo.toml; rules_rs needs matching workspace lock entries.
|
|
run: cargo update --workspace
|
|
|
|
- name: Build staging archive
|
|
shell: bash
|
|
working-directory: ${{ github.workspace }}
|
|
env:
|
|
TARGET: ${{ inputs.target }}
|
|
BUNDLE: ${{ inputs.bundle }}
|
|
BUILD_MODE: ${{ inputs.build-mode }}
|
|
# Keep Git Bash from rewriting Bazel labels as Windows paths.
|
|
MSYS2_ARG_CONV_EXCL: "*"
|
|
run: |
|
|
./.github/scripts/run-bazel-ci.sh \
|
|
${{ runner.os == 'Windows' && '--windows-msvc-host-platform' || '' }} -- build \
|
|
${{ runner.os == 'macOS' && '--config=ci-macos --remote_download_toplevel' || '' }} \
|
|
"--platforms=@rules_rs//rs/platforms:$TARGET" \
|
|
"--//codex-rs:runtime_package_build_mode=$BUILD_MODE" \
|
|
-- "//codex-rs:runtime_package_$BUNDLE"
|
|
|
|
- name: Extract staging archive
|
|
shell: bash
|
|
working-directory: ${{ github.workspace }}
|
|
env:
|
|
BUNDLE: ${{ inputs.bundle }}
|
|
RELEASE_DIR: ${{ inputs.release-dir }}
|
|
run: |
|
|
mkdir -p "$RELEASE_DIR"
|
|
tar -xzf "bazel-bin/codex-rs/runtime_package_$BUNDLE.tar.gz" -C "$RELEASE_DIR"
|