diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9a3527f00..65a5bdcbb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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... @@ -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... @@ -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... @@ -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... diff --git a/.github/workflows/setup-dev-drive.ps1 b/.github/workflows/setup-dev-drive.ps1 index 1c626f749..bbb0db75c 100644 --- a/.github/workflows/setup-dev-drive.ps1 +++ b/.github/workflows/setup-dev-drive.ps1 @@ -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 - -Write-Output $Volume + 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 + +# Configure a temporary directory $Tmp = "$($Drive)/uv-tmp" # Create the directory ahead of time in an attempt to avoid race-conditions