ci: Provide Inno Setup tools to some Windows CI jobs

This commit is contained in:
Brad King
2023-04-26 15:46:11 -04:00
committed by Jannik Alber
parent 582c17bdd2
commit 9b0dc652ff
4 changed files with 26 additions and 0 deletions

1
.gitlab/.gitignore vendored
View File

@@ -3,6 +3,7 @@
/bcc*
/cmake*
/ispc*
/innosetup
/jom
/llvm*
/mingw

View File

@@ -1,3 +1,4 @@
if ("$env:CMAKE_CI_NIGHTLY" -eq "true") {
. ".gitlab/ci/innosetup-env.ps1"
. ".gitlab/ci/ispc-env.ps1"
}

4
.gitlab/ci/innosetup-env.ps1 Executable file
View File

@@ -0,0 +1,4 @@
$pwdpath = $pwd.Path
& "$pwsh" -File ".gitlab/ci/innosetup.ps1"
Set-Item -Force -Path "env:PATH" -Value "$pwdpath\.gitlab\innosetup;$env:PATH"
ISCC 2>$null | Select -First 1

20
.gitlab/ci/innosetup.ps1 Executable file
View File

@@ -0,0 +1,20 @@
$erroractionpreference = "stop"
$version = "6.2.2-1"
$sha256sum = "34D5311070678617424628A88C8A7F7BE41157B1A59112F9DFDA1D7EFD4469CC"
$filename = "innosetup-$version"
$tarball = "$filename.zip"
$outdir = $pwd.Path
$outdir = "$outdir\.gitlab"
$ProgressPreference = 'SilentlyContinue'
Invoke-WebRequest -Uri "https://cmake.org/files/dependencies/internal/$tarball" -OutFile "$outdir\$tarball"
$hash = Get-FileHash "$outdir\$tarball" -Algorithm SHA256
if ($hash.Hash -ne $sha256sum) {
exit 1
}
Add-Type -AssemblyName System.IO.Compression.FileSystem
[System.IO.Compression.ZipFile]::ExtractToDirectory("$outdir\$tarball", "$outdir")
Move-Item -Path "$outdir\$filename" -Destination "$outdir\innosetup"
Remove-Item "$outdir\$tarball"