diff --git a/.github/scripts/setup-dev-drive.ps1 b/.github/scripts/setup-dev-drive.ps1 index e694ba98fc..097f18e7c5 100644 --- a/.github/scripts/setup-dev-drive.ps1 +++ b/.github/scripts/setup-dev-drive.ps1 @@ -1,35 +1,14 @@ # Configure a fast drive for Windows CI jobs. # -# If the runner already exposes `D:`, prefer it directly. Otherwise create a -# small Dev Drive VHD and use that mount point for temp-heavy work. +# If the runner already exposes `D:`, prefer it directly. Otherwise fall back +# to `C:` without trying to provision a new volume in CI. if (Test-Path "D:\") { Write-Output "Using existing drive at D:" $Drive = "D:" } else { - try { - $VhdPath = "C:/codex_dev_drive.vhdx" - $Volume = New-VHD -Path $VhdPath -SizeBytes 20GB -ErrorAction Stop | - Mount-VHD -Passthru -ErrorAction Stop | - Initialize-Disk -Passthru -ErrorAction Stop | - New-Partition -AssignDriveLetter -UseMaximumSize -ErrorAction Stop | - Format-Volume -DevDrive -Confirm:$false -Force -ErrorAction Stop - - $Drive = "$($Volume.DriveLetter):" - - fsutil devdrv trust $Drive - fsutil devdrv enable /disallowAv - - Dismount-VHD -Path $VhdPath - Mount-VHD -Path $VhdPath - - Write-Output $Volume - fsutil devdrv query $Drive - Write-Output "Using Dev Drive at $Drive" - } catch { - Write-Warning "Failed to create Dev Drive, falling back to C:. $($_.Exception.Message)" - $Drive = "C:" - } + Write-Warning "No D: drive available; falling back to C:" + $Drive = "C:" } $Tmp = "$Drive\codex-tmp"