Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Depot Windows runner in cargo-test #12320

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,8 @@ jobs:
cargo-test-windows:
timeout-minutes: 15
needs: determine_changes
if: ${{ github.repository == 'astral-sh/uv' && !contains(github.event.pull_request.labels.*.name, 'no-test') && (needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main') }}
runs-on: github-windows-2025-x86_64-16
if: ${{ github.repository == 'astral-sh/uv' && (needs.determine_changes.outputs.code == 'true' || github.ref == 'refs/heads/main') }}
runs-on: depot-windows-2022-16
name: "cargo test | windows"
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/setup-dev-drive.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
# the test suite) and we need to create a dev drive. This script automatically
# configures the appropriate drive.

# Note we use `Get-PSDrive` is not sufficient because the drive letter is assigned.
# Note `Get-PSDrive` is not sufficient because the drive letter is assigned.
if (Test-Path "D:\") {
Write-Output "Using existing drive at D:"
$Drive = "D:"
} else {
# If `New-VHD` is available (as it is on GitHub runners), create a virtual drive
} elseif (Get-Command New-VHD -ErrorAction SilentlyContinue) {
# The size (20 GB) is chosen empirically to be large enough for our
# workflows; larger drives can take longer to set up.
$Volume = New-VHD -Path C:/uv_dev_drive.vhdx -SizeBytes 20GB |
Expand Down Expand Up @@ -38,6 +39,11 @@ if (Test-Path "D:\") {
fsutil devdrv query $Drive

Write-Output "Using Dev Drive at $Volume"
# On some runners, i.e., Depot's beta Windows runners — Hyper-V is not available
# and we can't create an optimized drive
} else {
Write-Output "Hyper-V is not available, using existing drive at C:"
$Drive = "C:"
}

$Tmp = "$($Drive)\uv-tmp"
Expand Down
Loading