mirror of
https://github.com/openai/codex.git
synced 2026-05-24 04:54:52 +00:00
Carry Windows sandbox helpers for x64 test fanout
Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
40
.github/workflows/rust-ci-full.yml
vendored
40
.github/workflows/rust-ci-full.yml
vendored
@@ -757,6 +757,7 @@ jobs:
|
||||
env:
|
||||
CARGO_INCREMENTAL: "0"
|
||||
WINDOWS_X64_ARCHIVE_FILE: windows-x64-nextest-archive.tar.zst
|
||||
WINDOWS_X64_HELPERS_ARTIFACT: windows-x64-test-helpers
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
@@ -798,6 +799,21 @@ jobs:
|
||||
--cargo-profile ci-test \
|
||||
--timings \
|
||||
--archive-file "${archive_dir}/${WINDOWS_X64_ARCHIVE_FILE}"
|
||||
- name: Build Windows sandbox test helpers
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
cargo build \
|
||||
--target x86_64-pc-windows-msvc \
|
||||
--profile ci-test \
|
||||
-p codex-windows-sandbox \
|
||||
--bin codex-windows-sandbox-setup \
|
||||
--bin codex-command-runner
|
||||
|
||||
helper_dir="${RUNNER_TEMP}/${WINDOWS_X64_HELPERS_ARTIFACT}"
|
||||
mkdir -p "${helper_dir}"
|
||||
cp target/x86_64-pc-windows-msvc/ci-test/codex-windows-sandbox-setup.exe "${helper_dir}/"
|
||||
cp target/x86_64-pc-windows-msvc/ci-test/codex-command-runner.exe "${helper_dir}/"
|
||||
- name: Upload nextest archive
|
||||
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
|
||||
with:
|
||||
@@ -805,6 +821,13 @@ jobs:
|
||||
path: ${{ runner.temp }}/nextest-archive/${{ env.WINDOWS_X64_ARCHIVE_FILE }}
|
||||
if-no-files-found: error
|
||||
retention-days: 1
|
||||
- name: Upload Windows sandbox test helpers
|
||||
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
|
||||
with:
|
||||
name: ${{ env.WINDOWS_X64_HELPERS_ARTIFACT }}
|
||||
path: ${{ runner.temp }}/${{ env.WINDOWS_X64_HELPERS_ARTIFACT }}/*.exe
|
||||
if-no-files-found: error
|
||||
retention-days: 1
|
||||
- name: Upload Cargo timings (nextest)
|
||||
if: always()
|
||||
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
|
||||
@@ -836,6 +859,7 @@ jobs:
|
||||
working-directory: codex-rs
|
||||
env:
|
||||
WINDOWS_X64_ARCHIVE_FILE: windows-x64-nextest-archive.tar.zst
|
||||
WINDOWS_X64_HELPERS_ARTIFACT: windows-x64-test-helpers
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@@ -864,18 +888,32 @@ jobs:
|
||||
with:
|
||||
name: windows-x64-nextest-archive
|
||||
path: ${{ runner.temp }}/windows-x64-nextest-archive
|
||||
- name: Download Windows sandbox test helpers
|
||||
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||
with:
|
||||
name: ${{ env.WINDOWS_X64_HELPERS_ARTIFACT }}
|
||||
path: ${{ runner.temp }}/${{ env.WINDOWS_X64_HELPERS_ARTIFACT }}
|
||||
- name: tests
|
||||
id: test
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
archive_file="${RUNNER_TEMP}/windows-x64-nextest-archive/${WINDOWS_X64_ARCHIVE_FILE}"
|
||||
setup_helper_unix="${RUNNER_TEMP}/${WINDOWS_X64_HELPERS_ARTIFACT}/codex-windows-sandbox-setup.exe"
|
||||
command_runner_unix="${RUNNER_TEMP}/${WINDOWS_X64_HELPERS_ARTIFACT}/codex-command-runner.exe"
|
||||
test -f "${setup_helper_unix}"
|
||||
test -f "${command_runner_unix}"
|
||||
workspace_root="$(cygpath -w "$(pwd)")"
|
||||
extract_dir_unix="${RUNNER_TEMP}/nextest-extract-shard-${{ matrix.shard }}"
|
||||
mkdir -p "${extract_dir_unix}"
|
||||
setup_helper="$(cygpath -w "${setup_helper_unix}")"
|
||||
command_runner="$(cygpath -w "${command_runner_unix}")"
|
||||
extract_dir="$(cygpath -w "${extract_dir_unix}")"
|
||||
archive_file="$(cygpath -w "${archive_file}")"
|
||||
cargo nextest run \
|
||||
env \
|
||||
"CARGO_BIN_EXE_codex_windows_sandbox_setup=${setup_helper}" \
|
||||
"CARGO_BIN_EXE_codex_command_runner=${command_runner}" \
|
||||
cargo nextest run \
|
||||
--no-fail-fast \
|
||||
--archive-file "${archive_file}" \
|
||||
--workspace-remap "${workspace_root}" \
|
||||
|
||||
Reference in New Issue
Block a user