mirror of
https://github.com/Kitware/CMake.git
synced 2025-12-31 19:00:54 -06:00
ci: Provide Inno Setup tools to some Windows CI jobs
This commit is contained in:
1
.gitlab/.gitignore
vendored
1
.gitlab/.gitignore
vendored
@@ -3,6 +3,7 @@
|
||||
/bcc*
|
||||
/cmake*
|
||||
/ispc*
|
||||
/innosetup
|
||||
/jom
|
||||
/llvm*
|
||||
/mingw
|
||||
|
||||
@@ -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
4
.gitlab/ci/innosetup-env.ps1
Executable 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
20
.gitlab/ci/innosetup.ps1
Executable 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"
|
||||
Reference in New Issue
Block a user