mirror of
https://github.com/openai/codex.git
synced 2026-05-15 16:53:05 +00:00
Refine Windows Dev Drive setup
Incorporate the uv Dev Drive setup pattern by remounting newly-created Dev Drive VHDs after filter changes, using the configured temp directory for Bazel repo contents cache, and moving Cargo target output onto the selected fast Windows drive while preserving the default target path on other platforms. Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
2
.github/actions/setup-bazel-ci/action.yml
vendored
2
.github/actions/setup-bazel-ci/action.yml
vendored
@@ -64,7 +64,7 @@ runs:
|
||||
# because some Windows test launchers mis-handle MANIFEST paths there.
|
||||
$driveRoot = if ($env:DEV_DRIVE) { $env:DEV_DRIVE } elseif (Test-Path 'D:\') { 'D:' } else { 'C:' }
|
||||
$bazelOutputUserRoot = Join-Path $driveRoot 'b'
|
||||
$repoContentsCache = Join-Path $env:RUNNER_TEMP "bazel-repo-contents-cache-$env:GITHUB_RUN_ID-$env:GITHUB_JOB"
|
||||
$repoContentsCache = Join-Path $env:TEMP "bazel-repo-contents-cache-$env:GITHUB_RUN_ID-$env:GITHUB_JOB"
|
||||
"BAZEL_OUTPUT_USER_ROOT=$bazelOutputUserRoot" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
"BAZEL_REPO_CONTENTS_CACHE=$repoContentsCache" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
|
||||
|
||||
13
.github/scripts/setup-dev-drive.ps1
vendored
13
.github/scripts/setup-dev-drive.ps1
vendored
@@ -44,6 +44,15 @@ if (Test-Path "D:\") {
|
||||
|
||||
Invoke-BestEffort { fsutil devdrv trust $Drive } "Trusting Dev Drive $Drive"
|
||||
Invoke-BestEffort { fsutil devdrv enable /disallowAv } "Disabling AV filter attachment for Dev Drives"
|
||||
try {
|
||||
Dismount-VHD -Path $VhdPath
|
||||
Mount-VHD -Path $VhdPath | Out-Null
|
||||
} catch {
|
||||
Write-Warning "Remounting Dev Drive $Drive failed: $($_.Exception.Message)"
|
||||
if (-not (Test-Path "$Drive\")) {
|
||||
throw
|
||||
}
|
||||
}
|
||||
Invoke-BestEffort { fsutil devdrv query $Drive } "Querying Dev Drive $Drive"
|
||||
|
||||
Write-Output "Using Dev Drive at $Drive"
|
||||
@@ -55,8 +64,12 @@ if (Test-Path "D:\") {
|
||||
$Tmp = "$Drive\codex-tmp"
|
||||
New-Item -Path $Tmp -ItemType Directory -Force | Out-Null
|
||||
|
||||
$CargoTargetDir = "$Drive\codex-cargo-target"
|
||||
New-Item -Path $CargoTargetDir -ItemType Directory -Force | Out-Null
|
||||
|
||||
@(
|
||||
"DEV_DRIVE=$Drive"
|
||||
"CARGO_TARGET_DIR=$CargoTargetDir"
|
||||
"TMP=$Tmp"
|
||||
"TEMP=$Tmp"
|
||||
) | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
|
||||
6
.github/workflows/rust-ci-full.yml
vendored
6
.github/workflows/rust-ci-full.yml
vendored
@@ -161,6 +161,7 @@ jobs:
|
||||
# mixed-architecture archives under sccache.
|
||||
USE_SCCACHE: ${{ (startsWith(matrix.runner, 'windows') || (matrix.runner == 'macos-15-xlarge' && matrix.target == 'x86_64-apple-darwin')) && 'false' || 'true' }}
|
||||
CARGO_INCREMENTAL: "0"
|
||||
CARGO_TARGET_DIR: ${{ github.workspace }}/codex-rs/target
|
||||
SCCACHE_CACHE_SIZE: 10G
|
||||
# In rust-ci, representative release-profile checks use thin LTO for faster feedback.
|
||||
CARGO_PROFILE_RELEASE_LTO: ${{ matrix.profile == 'release' && 'thin' || 'fat' }}
|
||||
@@ -470,7 +471,7 @@ jobs:
|
||||
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
|
||||
with:
|
||||
name: cargo-timings-rust-ci-clippy-${{ matrix.target }}-${{ matrix.profile }}
|
||||
path: codex-rs/target/**/cargo-timings/cargo-timing.html
|
||||
path: ${{ env.CARGO_TARGET_DIR }}/**/cargo-timings/cargo-timing.html
|
||||
if-no-files-found: warn
|
||||
|
||||
# Save caches explicitly; make non-fatal so cache packaging
|
||||
@@ -541,6 +542,7 @@ jobs:
|
||||
# mixed-architecture archives under sccache.
|
||||
USE_SCCACHE: ${{ (startsWith(matrix.runner, 'windows') || (matrix.runner == 'macos-15-xlarge' && matrix.target == 'x86_64-apple-darwin')) && 'false' || 'true' }}
|
||||
CARGO_INCREMENTAL: "0"
|
||||
CARGO_TARGET_DIR: ${{ github.workspace }}/codex-rs/target
|
||||
SCCACHE_CACHE_SIZE: 10G
|
||||
|
||||
strategy:
|
||||
@@ -701,7 +703,7 @@ jobs:
|
||||
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
|
||||
with:
|
||||
name: cargo-timings-rust-ci-nextest-${{ matrix.target }}-${{ matrix.profile }}
|
||||
path: codex-rs/target/**/cargo-timings/cargo-timing.html
|
||||
path: ${{ env.CARGO_TARGET_DIR }}/**/cargo-timings/cargo-timing.html
|
||||
if-no-files-found: warn
|
||||
|
||||
- name: Save cargo home cache
|
||||
|
||||
Reference in New Issue
Block a user