Files
Abdulwahb Isam c8a9336acb disktree: test: build and check the Windows setup on every pull request
CI compiled nothing of the installer, so a broken disktree.iss would first
fail inside a release, after its draft exists, and the Arm64 setup had
never been built at all. The Windows job now compiles the x64 setup and
the Windows aarch64 job the Arm64 one; both run check-setup.ps1, which
installs it silently for the current user, checks the exe, Start menu and
desktop shortcuts and the uninstall entry, installs again as an upgrade
(one entry left), uninstalls and checks nothing remains.

install-inno.ps1 takes over the pinned, hash-checked Inno Setup install
from release.yml and now fails on a non-zero installer exit or a missing
ISCC.exe instead of leaving the next step to report it.

Verified locally on Windows 11 x64: both scripts pass, and the CI
Installer step body, run as written, compiles a 0.0.0 setup and reports
"setup installs, upgrades and uninstalls cleanly". Upgrading while
disktree runs closes it through Restart Manager without a reboot. The
Arm64 job has not run yet.
2026-10-16 09:02:06 +03:00

23 lines
1.1 KiB
PowerShell

# Install the pinned Inno Setup into -Dir for the current user and put it on
# the GitHub Actions PATH. Pinned and checked rather than the runner's own:
# the x64 and Arm64 images carry different, older versions.
param([Parameter(Mandatory)] [string] $Dir)
$ErrorActionPreference = 'Stop'
$url = 'https://github.com/jrsoftware/issrc/releases/download/is-7_1_0/innosetup-7.1.0-x64.exe'
$sha256 = '0362a383ed217d4c4239b5933866dd96d3eb2102737da92f80f6057a4b40df2f'
$setup = Join-Path ([IO.Path]::GetTempPath()) 'innosetup-7.1.0-x64.exe'
Invoke-WebRequest $url -OutFile $setup
$hash = (Get-FileHash $setup -Algorithm SHA256).Hash.ToLower()
if ($hash -ne $sha256) { throw "Inno Setup download has SHA256 $hash" }
$p = Start-Process $setup -Wait -PassThru -ArgumentList `
'/VERYSILENT', '/SUPPRESSMSGBOXES', '/NORESTART', '/SP-',
'/CURRENTUSER', "/DIR=$Dir"
if ($p.ExitCode -ne 0) { throw "Inno Setup install exited $($p.ExitCode)" }
if (-not (Test-Path (Join-Path $Dir 'ISCC.exe'))) {
throw "ISCC.exe is missing from $Dir"
}
if ($env:GITHUB_PATH) { $Dir >> $env:GITHUB_PATH }