From c2d2439762d84c0dff4e746858d274b4063ed099 Mon Sep 17 00:00:00 2001 From: starr-openai Date: Wed, 6 May 2026 22:36:43 -0700 Subject: [PATCH] Give Windows arm64 tests enough CI time Let the Windows arm64 test matrix use a longer timeout after CI showed the lane spending most of the default 45 minutes compiling before nextest could finish. Restore a guarded Dev Drive VHD provisioning attempt for GitHub-hosted runners that no longer expose D:, while preserving the C: fallback when provisioning is unavailable. Also pin nextest through taiki-e/install-action's supported tool version syntax so the requested version is not ignored. Co-authored-by: Codex --- .github/scripts/setup-dev-drive.ps1 | 49 ++++++++++++++++++++++++++--- .github/workflows/rust-ci-full.yml | 12 +++---- 2 files changed, 51 insertions(+), 10 deletions(-) diff --git a/.github/scripts/setup-dev-drive.ps1 b/.github/scripts/setup-dev-drive.ps1 index 097f18e7c5..2b94e1b66f 100644 --- a/.github/scripts/setup-dev-drive.ps1 +++ b/.github/scripts/setup-dev-drive.ps1 @@ -1,14 +1,55 @@ # Configure a fast drive for Windows CI jobs. # -# If the runner already exposes `D:`, prefer it directly. Otherwise fall back -# to `C:` without trying to provision a new volume in CI. +# GitHub-hosted Windows runners do not always expose a secondary D: volume. When +# they do not, try to create a Dev Drive VHD and fall back to C: if the runner +# image does not allow that provisioning path. + +function Use-FallbackDrive { + param([string]$Reason) + + Write-Warning "$Reason Falling back to C:" + return "C:" +} + +function Invoke-BestEffort { + param([scriptblock]$Script, [string]$Description) + + try { + & $Script + } catch { + Write-Warning "$Description failed: $($_.Exception.Message)" + } +} if (Test-Path "D:\") { Write-Output "Using existing drive at D:" $Drive = "D:" } else { - Write-Warning "No D: drive available; falling back to C:" - $Drive = "C:" + try { + $VhdPath = Join-Path $env:RUNNER_TEMP "codex-dev-drive.vhdx" + $SizeBytes = 64GB + + if (Test-Path $VhdPath) { + Remove-Item -Path $VhdPath -Force + } + + New-VHD -Path $VhdPath -SizeBytes $SizeBytes -Dynamic -ErrorAction Stop | Out-Null + $Mounted = Mount-VHD -Path $VhdPath -Passthru -ErrorAction Stop + $Disk = $Mounted | Get-Disk -ErrorAction Stop + $Disk | Initialize-Disk -PartitionStyle GPT -ErrorAction Stop + $Partition = $Disk | New-Partition -AssignDriveLetter -UseMaximumSize -ErrorAction Stop + $Volume = $Partition | Format-Volume -FileSystem ReFS -NewFileSystemLabel "CodexDevDrive" -DevDrive -Confirm:$false -Force -ErrorAction Stop + + $Drive = "$($Volume.DriveLetter):" + + Invoke-BestEffort { fsutil devdrv trust $Drive } "Trusting Dev Drive $Drive" + Invoke-BestEffort { fsutil devdrv enable /disallowAv } "Disabling AV filter attachment for Dev Drives" + Invoke-BestEffort { fsutil devdrv query $Drive } "Querying Dev Drive $Drive" + + Write-Output "Using Dev Drive at $Drive" + } catch { + $Drive = Use-FallbackDrive "Failed to create Dev Drive: $($_.Exception.Message)" + } } $Tmp = "$Drive\codex-tmp" diff --git a/.github/workflows/rust-ci-full.yml b/.github/workflows/rust-ci-full.yml index 1a32a5e3b5..efe3ae0c6a 100644 --- a/.github/workflows/rust-ci-full.yml +++ b/.github/workflows/rust-ci-full.yml @@ -536,10 +536,10 @@ jobs: tests: name: Tests — ${{ matrix.runner }} - ${{ matrix.target }}${{ matrix.remote_env == 'true' && ' (remote)' || '' }} runs-on: ${{ matrix.runs_on || matrix.runner }} - # Perhaps we can bring this back down to 30m once we finish the cutover - # from tui_app_server/ to tui/. Incidentally, windows-arm64 was the main - # offender for exceeding the timeout. - timeout-minutes: 45 + # Perhaps we can bring this back down once we finish the cutover from + # tui_app_server/ to tui/. Incidentally, windows-arm64 was the main offender + # for exceeding the timeout. + timeout-minutes: ${{ matrix.timeout_minutes || 45 }} defaults: run: working-directory: codex-rs @@ -581,6 +581,7 @@ jobs: - runner: windows-arm64 target: aarch64-pc-windows-msvc profile: dev + timeout_minutes: 75 runs_on: group: codex-runners labels: codex-windows-arm64 @@ -682,8 +683,7 @@ jobs: - uses: taiki-e/install-action@44c6d64aa62cd779e873306675c7a58e86d6d532 # v2 with: - tool: nextest - version: 0.9.103 + tool: nextest@0.9.103 - name: Enable unprivileged user namespaces (Linux) if: runner.os == 'Linux'