File tree Expand file tree Collapse file tree 1 file changed +22
-3
lines changed
Expand file tree Collapse file tree 1 file changed +22
-3
lines changed Original file line number Diff line number Diff line change 1- # This uses `D:` as the workspace instead of `C:`, as the performance is much
2- # better. Previously, we created a ReFS Dev Drive, but this is actually faster.
1+ # Configures a drive for testing in CI.
2+
3+ # When not using a GitHub Actions "larger runner", the `D:` drive is present and
4+ # has similar or better performance characteristics than a ReFS dev drive.
5+ # Sometimes using a larger runner is still more performant (e.g., when running
6+ # the test suite) and we need to create a dev drive. This script automatically
7+ # configures the appropriate drive.
8+
9+ # Note we use `Get-PSDrive` is not sufficient because the drive letter is assigned.
10+ if (Test-Path " D:\" ) {
11+ Write-Output " Using `D:` drive"
12+ $Drive = " D:"
13+ } else {
14+ $Volume = New-VHD - Path C:/ uv_dev_drive.vhdx - SizeBytes 20 GB |
15+ Mount-VHD - Passthru |
16+ Initialize-Disk - Passthru |
17+ New-Partition - AssignDriveLetter - UseMaximumSize |
18+ Format-Volume - FileSystem ReFS - Confirm:$false - Force
19+
20+ Write-Output " Using ReFS drive at $Volume "
21+ $Drive = " $ ( $Volume.DriveLetter ) :"
22+ }
323
4- $Drive = " D:"
524$Tmp = " $ ( $Drive ) \uv-tmp"
625
726# Create the directory ahead of time in an attempt to avoid race-conditions
You can’t perform that action at this time.
0 commit comments