Skip to content

Commit 13a6926

Browse files
authored
Merge pull request #708 from frstrtr/ci-steward/release-inno-setup-resilient
release.yml: resilient Windows setup.exe step (skip when Inno Setup unavailable, always ship .zip)
2 parents 9945019 + 4ea21a1 commit 13a6926

1 file changed

Lines changed: 17 additions & 2 deletions

File tree

.github/workflows/release.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -577,14 +577,28 @@ jobs:
577577
name: pkg-windows-${{ matrix.coin }}
578578
path: c2pool-*-windows-x86_64.zip
579579

580+
# Installer is a NICE-TO-HAVE: the portable .zip (uploaded above) is the
581+
# must-have deliverable. If Inno Setup is unavailable on the runner (e.g.
582+
# VM217 where choco cannot write C:\ProgramData\chocolatey\lib-bad), warn
583+
# and skip so the job still succeeds and the .zip ships. Durable fix is a
584+
# persistent Inno Setup 6 install on the runner (ISCC on PATH).
580585
- name: Build setup.exe installer (Inno Setup)
581586
if: steps.presence.outputs.exists == '1'
582587
shell: cmd
588+
continue-on-error: true
583589
run: |
584-
choco install innosetup -y --no-progress
590+
set "ISCC=C:\Program Files (x86)\Inno Setup 6\ISCC.exe"
591+
if not exist "%ISCC%" (
592+
echo Inno Setup not found; attempting install via chocolatey...
593+
choco install innosetup -y --no-progress || echo WARNING: choco install innosetup failed
594+
)
595+
if not exist "%ISCC%" (
596+
echo ::warning::Inno Setup unavailable on this runner; skipping setup.exe. Portable .zip already uploaded.
597+
exit /b 0
598+
)
585599
set "PKG=c2pool-${{ matrix.coin }}-${{ steps.ver.outputs.version }}-windows-x86_64"
586600
for /f "delims=" %%i in ('powershell -NoProfile -Command "(Get-ChildItem -Path 'C:\Program Files\Microsoft Visual Studio\2022' -Recurse -Filter vc_redist.x64.exe -ErrorAction SilentlyContinue | Select-Object -First 1).FullName"') do set "VCREDIST=%%i"
587-
"C:\Program Files (x86)\Inno Setup 6\ISCC.exe" installer\windows\c2pool-setup.iss ^
601+
"%ISCC%" installer\windows\c2pool-setup.iss ^
588602
/DPACKAGE_DIR="%CD%\%PKG%" ^
589603
/DVCREDIST_PATH="%VCREDIST%" ^
590604
/DMyAppName=c2pool-${{ matrix.coin }} ^
@@ -599,6 +613,7 @@ jobs:
599613
with:
600614
name: pkg-windows-setup-${{ matrix.coin }}
601615
path: c2pool-*-windows-x86_64-setup.exe
616+
if-no-files-found: ignore
602617

603618
# ════════════════════════════════════════════════════════════════════════════
604619
# Aggregate: single SHA256SUMS over every produced package; on tags,

0 commit comments

Comments
 (0)