mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-27 19:01:02 +00:00
Retry NSIS install and verify makensis on Windows CI (#15768)
This commit is contained in:
@@ -448,9 +448,26 @@ jobs:
|
|||||||
|
|
||||||
- name: Install nsis
|
- name: Install nsis
|
||||||
if: runner.os == 'Windows' && !vars.SELF_HOSTED
|
if: runner.os == 'Windows' && !vars.SELF_HOSTED
|
||||||
|
shell: pwsh
|
||||||
|
# The Chocolatey community feed intermittently 504s, and `choco install`
|
||||||
|
# exits 0 when package resolution fails that way. Unchecked, the job then
|
||||||
|
# builds for ~25 minutes before `cpack -G NSIS` reports a missing makensis.
|
||||||
|
# Retry the install and verify makensis itself, so a real failure stops here.
|
||||||
run: |
|
run: |
|
||||||
dir "C:/Program Files (x86)/Windows Kits/10/Include"
|
dir "C:/Program Files (x86)/Windows Kits/10/Include"
|
||||||
choco install nsis
|
$nsisDir = Join-Path ${env:ProgramFiles(x86)} 'NSIS'
|
||||||
|
$makensis = Join-Path $nsisDir 'makensis.exe'
|
||||||
|
for ($attempt = 1; $attempt -le 3 -and -not (Test-Path $makensis); $attempt++) {
|
||||||
|
if ($attempt -gt 1) { Start-Sleep -Seconds (15 * $attempt) }
|
||||||
|
Write-Host "::group::choco install nsis (attempt $attempt)"
|
||||||
|
choco install nsis --yes --no-progress
|
||||||
|
Write-Host "::endgroup::"
|
||||||
|
}
|
||||||
|
if (-not (Test-Path $makensis)) {
|
||||||
|
throw "NSIS install failed: $makensis not found after 3 attempts."
|
||||||
|
}
|
||||||
|
& $makensis /VERSION
|
||||||
|
$nsisDir | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
|
||||||
|
|
||||||
- name: Build slicer Win
|
- name: Build slicer Win
|
||||||
if: runner.os == 'Windows'
|
if: runner.os == 'Windows'
|
||||||
|
|||||||
Reference in New Issue
Block a user