ci: wait for Python installer on Windows
Some checks failed
Build Windows Release / Build Windows x64 Release (MSVC + Qt) (push) Failing after 49s

This commit is contained in:
luochen570
2026-05-30 22:03:08 +08:00
parent 9bd4433498
commit 1701f36942

View File

@@ -78,8 +78,9 @@ jobs:
$pythonUrl = 'https://www.python.org/ftp/python/3.12.10/python-3.12.10-amd64.exe'
Write-Host "Downloading Python from $pythonUrl"
Invoke-WebRequest -Uri $pythonUrl -OutFile $installer
& $installer /quiet InstallAllUsers=0 TargetDir=$pythonRoot Include_pip=1 Include_test=0 PrependPath=0
if ($LASTEXITCODE -ne 0) { throw "Python installer failed, exit code: $LASTEXITCODE" }
$installArgs = @('/quiet', 'InstallAllUsers=0', "TargetDir=$pythonRoot", 'Include_pip=1', 'Include_test=0', 'PrependPath=0')
$proc = Start-Process -FilePath $installer -ArgumentList $installArgs -Wait -PassThru
if ($proc.ExitCode -ne 0) { throw "Python installer failed, exit code: $($proc.ExitCode)" }
}
if (-not (Test-Path $pythonExe)) { throw "Python installation finished but python.exe was not found: $pythonExe" }
$pythonArgs = @()