Skip to content

Commit

Permalink
Use D: drive for Windows CI
Browse files Browse the repository at this point in the history
  • Loading branch information
zanieb committed Dec 26, 2024
1 parent 473e274 commit 59f1657
Showing 1 changed file with 8 additions and 16 deletions.
24 changes: 8 additions & 16 deletions .github/workflows/setup-dev-drive.ps1
Original file line number Diff line number Diff line change
@@ -1,27 +1,19 @@
# This creates a 20GB dev drive, and exports all required environment
# variables so that rustup, uv and others all use the dev drive as much
# as possible.
$Volume = New-VHD -Path C:/uv_dev_drive.vhdx -SizeBytes 20GB |
Mount-VHD -Passthru |
Initialize-Disk -Passthru |
New-Partition -AssignDriveLetter -UseMaximumSize |
Format-Volume -FileSystem ReFS -Confirm:$false -Force
# This uses `D:` as the workspace instead of `C:`, as the performance is much
# better. Previously, we created a ReFS Dev Drive, but this is actually faster.

Write-Output $Volume

$Drive = "$($Volume.DriveLetter):"
$Tmp = "$($Drive)/uv-tmp"
$Drive = "D:\"
$Tmp = "$($Drive)\a\_temp\"

# Create the directory ahead of time in an attempt to avoid race-conditions
New-Item $Tmp -ItemType Directory
# New-Item $Tmp -ItemType Directory

Write-Output `
"DEV_DRIVE=$($Drive)" `
"TMP=$($Tmp)" `
"TEMP=$($Tmp)" `
"UV_INTERNAL__TEST_DIR=$($Tmp)" `
"RUSTUP_HOME=$($Drive)/.rustup" `
"CARGO_HOME=$($Drive)/.cargo" `
"UV_WORKSPACE=$($Drive)/uv" `
"RUSTUP_HOME=$($Tmp)\.rustup" `
"CARGO_HOME=$($Tmp)\.cargo" `
"UV_WORKSPACE=$($Tmp)\uv" `
>> $env:GITHUB_ENV

0 comments on commit 59f1657

Please sign in to comment.