Skip to content

Commit

Permalink
Improve performance of our test drive in Windows CI (#10651)
Browse files Browse the repository at this point in the history
Previously, we couldn't use a DevDrive
(#3522 (comment))
because our Windows version was not sufficient.

Recently, I upgraded our larger runners to Windows 2025 preview
(#10298) which I presume has support
for this.

I removed ReFS in
953c353
which didn't seem to do anything to performance.

I also found some notes on "trusted" DevDrives and "disabling anti-virus
filtering" which I simply have to try.
  • Loading branch information
zanieb authored Jan 16, 2025
1 parent 50c6465 commit 75a1a47
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 6 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Create Dev Drive using ReFS
- name: Setup Dev Drive
run: ${{ github.workspace }}/.github/workflows/setup-dev-drive.ps1

# actions/checkout does not let us clone into anywhere outside ${{ github.workspace }}, so we have to copy the clone...
Expand Down Expand Up @@ -260,7 +260,7 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Create Dev Drive using ReFS
- name: Setup Dev Drive
run: ${{ github.workspace }}/.github/workflows/setup-dev-drive.ps1

# actions/checkout does not let us clone into anywhere outside ${{ github.workspace }}, so we have to copy the clone...
Expand Down Expand Up @@ -333,7 +333,7 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Create Dev Drive using ReFS
- name: Setup Dev Drive
run: ${{ github.workspace }}/.github/workflows/setup-dev-drive.ps1

# actions/checkout does not let us clone into anywhere outside ${{ github.workspace }}, so we have to copy the clone...
Expand Down Expand Up @@ -522,7 +522,7 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Create Dev Drive using ReFS
- name: Setup Dev Drive
run: ${{ github.workspace }}/.github/workflows/setup-dev-drive.ps1

# actions/checkout does not let us clone into anywhere outside ${{ github.workspace }}, so we have to copy the clone...
Expand Down
20 changes: 18 additions & 2 deletions .github/workflows/setup-dev-drive.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,27 @@ $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
Format-Volume -DevDrive -Confirm:$false -Force

$Drive = "$($Volume.DriveLetter):"

# Set the drive as trusted
# See https://learn.microsoft.com/en-us/windows/dev-drive/#how-do-i-designate-a-dev-drive-as-trusted
fsutil devdrv trust $Drive

# Disable antivirus filtering on dev drives
# See https://learn.microsoft.com/en-us/windows/dev-drive/#how-do-i-configure-additional-filters-on-dev-drive
fsutil devdrv enable /disallowAv

# Remount so the changes take effect
Dismount-VHD -Path C:/uv_dev_drive.vhdx
Mount-VHD -Path C:/uv_dev_drive.vhdx

# Show some debug information
Write-Output $Volume
fsutil devdrv query $Drive

$Drive = "$($Volume.DriveLetter):"
# Configure a temporary directory
$Tmp = "$($Drive)/uv-tmp"

# Create the directory ahead of time in an attempt to avoid race-conditions
Expand Down

0 comments on commit 75a1a47

Please sign in to comment.