-
Notifications
You must be signed in to change notification settings - Fork 682
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(windows): Introduce setup-dev-drive.ps1, maximize dev drive usage (#…
…6858) As suggested by @samypr100 on #6680: #6680 (comment) ## Summary Instead of using `UV_INTERNAL__TEST_DIR`, it simply exports `TEMP` when running Windows jobs. ## Test Plan I'm going to run this manually under ProcMon on my Windows machine and see where uv writes temp files, hopefully to the dev drive and not `%(LOCAL)APPDATA%` or something. I'm going to commit a dummy code change and look at build time changes in CI.
- Loading branch information
1 parent
52bc93e
commit 3e207da
Showing
4 changed files
with
41 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# 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 | ||
|
||
Write-Output $Volume | ||
|
||
$Drive = "$($Volume.DriveLetter):" | ||
$Tmp = "$($Drive)/uv-tmp" | ||
|
||
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" ` | ||
>> $env:GITHUB_ENV | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters