From 29858ba925f381a9d59fabfca8a9d04a299b68cf Mon Sep 17 00:00:00 2001 From: Ian Bassi Date: Sat, 19 Sep 2026 01:16:10 -0300 Subject: [PATCH] Retry NSIS install and verify makensis on Windows CI (#15768) --- .github/workflows/build_orca.yml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_orca.yml b/.github/workflows/build_orca.yml index 53444ee16d..85458615b4 100644 --- a/.github/workflows/build_orca.yml +++ b/.github/workflows/build_orca.yml @@ -448,9 +448,26 @@ jobs: - name: Install nsis 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: | 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 if: runner.os == 'Windows'