mirror of
https://github.com/openai/codex.git
synced 2026-11-07 20:30:33 +00:00
Add a shared Windows Bazel setup action (#60010)
## What changed Add `.github/actions/setup-bazel-windows` to prepare MSVC, derive the Bazel Windows path, download the pinned Cygwin snapshot, and run the existing verified Windows dependency bootstrap. Export the Windows system root and host architecture for subsequent steps. Use the action in the Bazel workflow and argument-comment lint action. Remove an unused `EnvironmentAttachment` import from the session tests. GitOrigin-RevId: 8dc711dc9301bb44d49be3fdab79bd4ca981b7d0
This commit is contained in:
committed by
copyberry
parent
2497eab251
commit
a5a00d6c73
@@ -22,7 +22,7 @@ runs:
|
||||
|
||||
- name: Prepare native Windows audio dependencies
|
||||
if: ${{ runner.os == 'Windows' }}
|
||||
uses: ./third_party/voice/cargo-ci/windows-setup
|
||||
uses: ./.github/actions/setup-bazel-windows
|
||||
with:
|
||||
target: x86_64-pc-windows-msvc
|
||||
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
name: Set up Windows Bazel build tools
|
||||
description: Prepare MSVC and verified native dependencies for Windows Bazel builds.
|
||||
inputs:
|
||||
target:
|
||||
description: Native Windows target triple
|
||||
required: true
|
||||
windows-tools:
|
||||
description: Directory containing the public Windows voice bootstrap
|
||||
default: .github/scripts
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- uses: ./.github/actions/setup-msvc-env
|
||||
with:
|
||||
target: ${{ inputs.target }}
|
||||
- name: Install verified public Windows tools
|
||||
shell: pwsh
|
||||
env:
|
||||
WINDOWS_TOOLS: ${{ inputs.windows-tools }}
|
||||
TARGET: ${{ inputs.target }}
|
||||
run: |
|
||||
./.github/scripts/compute-bazel-windows-path.ps1
|
||||
$manifest = Get-Content -Raw "$env:WINDOWS_TOOLS/voice-cygwin-snapshot.json" | ConvertFrom-Json
|
||||
$pin = $manifest.archive
|
||||
$archive = Join-Path $env:RUNNER_TEMP $pin.name
|
||||
Invoke-WebRequest "https://github.com/openai/codex/releases/download/$($pin.tag)/$($pin.name)" -OutFile $archive
|
||||
& "$env:WINDOWS_TOOLS/setup-voice-windows.ps1" -Target $env:TARGET -SnapshotArchive $archive
|
||||
if (-not $env:SystemRoot) { throw "Windows SystemRoot is required" }
|
||||
"VOICE_WINDOWS_SYSTEM_ROOT=$env:SystemRoot" | Out-File $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
$hostArch = $env:PROCESSOR_ARCHITEW6432
|
||||
if (-not $hostArch) { $hostArch = $env:PROCESSOR_ARCHITECTURE }
|
||||
if (-not $hostArch) { throw "Windows host architecture is required" }
|
||||
"VOICE_WINDOWS_HOST_ARCH=$hostArch" | Out-File $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
@@ -178,7 +178,7 @@ jobs:
|
||||
|
||||
- name: Prepare native Windows audio dependencies
|
||||
if: runner.os == 'Windows'
|
||||
uses: ./third_party/voice/cargo-ci/windows-setup
|
||||
uses: ./.github/actions/setup-bazel-windows
|
||||
with:
|
||||
target: x86_64-pc-windows-msvc
|
||||
|
||||
@@ -282,7 +282,7 @@ jobs:
|
||||
|
||||
- name: Prepare native Windows audio dependencies
|
||||
if: runner.os == 'Windows'
|
||||
uses: ./third_party/voice/cargo-ci/windows-setup
|
||||
uses: ./.github/actions/setup-bazel-windows
|
||||
with:
|
||||
target: x86_64-pc-windows-msvc
|
||||
|
||||
@@ -379,7 +379,7 @@ jobs:
|
||||
|
||||
- name: Prepare native Windows audio dependencies
|
||||
if: runner.os == 'Windows'
|
||||
uses: ./third_party/voice/cargo-ci/windows-setup
|
||||
uses: ./.github/actions/setup-bazel-windows
|
||||
with:
|
||||
target: x86_64-pc-windows-msvc
|
||||
|
||||
@@ -480,7 +480,7 @@ jobs:
|
||||
|
||||
- name: Prepare native Windows audio dependencies
|
||||
if: runner.os == 'Windows'
|
||||
uses: ./third_party/voice/cargo-ci/windows-setup
|
||||
uses: ./.github/actions/setup-bazel-windows
|
||||
with:
|
||||
target: x86_64-pc-windows-msvc
|
||||
|
||||
|
||||
@@ -28,7 +28,6 @@ use crate::config::RuntimeConfigRefresh;
|
||||
use crate::context::ContextualUserFragment;
|
||||
use crate::context::DeveloperInstructions;
|
||||
use crate::context::TurnAborted;
|
||||
use crate::environment_selection::EnvironmentAttachment;
|
||||
use crate::environment_selection::EnvironmentConfigOrigin;
|
||||
use crate::environment_selection::ThreadEnvironments;
|
||||
use crate::environment_selection::TurnEnvironmentState;
|
||||
|
||||
Reference in New Issue
Block a user