Windows tests on self-hosted runners (#29764)

Windows self-hosted runners

Release Notes:

- N/A

---------

Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-authored-by: Junkui Zhang <364772080@qq.com>
This commit is contained in:
Peter Tripp 2025-06-16 17:29:36 -04:00 committed by GitHub
parent 701fa4daa8
commit 1f457169ba
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 105 additions and 99 deletions

View file

@ -1,21 +1,32 @@
$ErrorActionPreference = "Stop"
Write-Host "Your PATH entries:"
$env:Path -split ";" | ForEach-Object { Write-Host " $_" }
$needAddWorkspace = $false
if ($args -notcontains "-p" -and $args -notcontains "--package") {
if ($args -notcontains "-p" -and $args -notcontains "--package")
{
$needAddWorkspace = $true
}
# https://stackoverflow.com/questions/41324882/how-to-run-a-powershell-script-with-verbose-output/70020655#70020655
Set-PSDebug -Trace 2
# Set-PSDebug -Trace 2
$Cargo = $env:CARGO
if (-not $Cargo) {
if ($env:CARGO)
{
$Cargo = $env:CARGO
} elseif (Get-Command "cargo" -ErrorAction SilentlyContinue)
{
$Cargo = "cargo"
} else
{
Write-Error "Could not find cargo in path." -ErrorAction Stop
}
if ($needAddWorkspace) {
if ($needAddWorkspace)
{
& $Cargo clippy @args --workspace --release --all-targets --all-features -- --deny warnings
}
else {
} else
{
& $Cargo clippy @args --release --all-targets --all-features -- --deny warnings
}