From 5e5fecb7bca1a351df2c30b63d4d5a7194aa773f Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 21 Jan 2021 11:38:53 -0500 Subject: ci: speed up cmake and ninja downloads on Windows Invoke-WebRequest uses a progress bar by default, but we have no interactive session anyway. Turn it off to speed up downloads. --- .gitlab/ci/cmake.ps1 | 1 + .gitlab/ci/ninja.ps1 | 1 + 2 files changed, 2 insertions(+) diff --git a/.gitlab/ci/cmake.ps1 b/.gitlab/ci/cmake.ps1 index 3b42cae127..80fd0cd54d 100755 --- a/.gitlab/ci/cmake.ps1 +++ b/.gitlab/ci/cmake.ps1 @@ -7,6 +7,7 @@ $tarball = "$filename.zip" $outdir = $pwd.Path $outdir = "$outdir\.gitlab" +$ProgressPreference = 'SilentlyContinue' Invoke-WebRequest -Uri "https://github.com/Kitware/CMake/releases/download/v$version/$tarball" -OutFile "$outdir\$tarball" $hash = Get-FileHash "$outdir\$tarball" -Algorithm SHA256 if ($hash.Hash -ne $sha256sum) { diff --git a/.gitlab/ci/ninja.ps1 b/.gitlab/ci/ninja.ps1 index 91f8b02b74..cd08954368 100755 --- a/.gitlab/ci/ninja.ps1 +++ b/.gitlab/ci/ninja.ps1 @@ -7,6 +7,7 @@ $tarball = "$filename.zip" $outdir = $pwd.Path $outdir = "$outdir\.gitlab" +$ProgressPreference = 'SilentlyContinue' Invoke-WebRequest -Uri "https://github.com/ninja-build/ninja/releases/download/v$version/$tarball" -OutFile "$outdir\$tarball" $hash = Get-FileHash "$outdir\$tarball" -Algorithm SHA256 if ($hash.Hash -ne $sha256sum) { -- cgit v1.2.1 From 8efbb0c95fe79f883973b6f36b718f95662c147c Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 21 Jan 2021 11:41:14 -0500 Subject: ci: download WiX on Windows Avoid requiring Windows CI hosts to have WiX installed. --- .gitlab/ci/wix.ps1 | 18 ++++++++++++++++++ .gitlab/os-windows.yml | 3 +++ 2 files changed, 21 insertions(+) create mode 100755 .gitlab/ci/wix.ps1 diff --git a/.gitlab/ci/wix.ps1 b/.gitlab/ci/wix.ps1 new file mode 100755 index 0000000000..a9322b6ad2 --- /dev/null +++ b/.gitlab/ci/wix.ps1 @@ -0,0 +1,18 @@ +$erroractionpreference = "stop" + +$release = "wix3112rtm" +$sha256sum = "2C1888D5D1DBA377FC7FA14444CF556963747FF9A0A289A3599CF09DA03B9E2E" +$filename = "wix311-binaries" +$tarball = "$filename.zip" + +$outdir = $pwd.Path +$outdir = "$outdir\.gitlab" +$ProgressPreference = 'SilentlyContinue' +Invoke-WebRequest -Uri "https://github.com/wixtoolset/wix3/releases/download/$release/$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\wix\bin") diff --git a/.gitlab/os-windows.yml b/.gitlab/os-windows.yml index 63b87583f5..6b46573f8e 100644 --- a/.gitlab/os-windows.yml +++ b/.gitlab/os-windows.yml @@ -72,9 +72,12 @@ ## Windows-specific scripts .before_script_windows: &before_script_windows + - Invoke-Expression -Command .gitlab/ci/wix.ps1 - Invoke-Expression -Command .gitlab/ci/cmake.ps1 - Invoke-Expression -Command .gitlab/ci/ninja.ps1 - $pwdpath = $pwd.Path + - Set-Item -Force -Path "env:WIX" -Value "$pwdpath\.gitlab\wix" + - (& "$env:WIX\bin\light.exe" -help) | Select -First 1 - Set-Item -Force -Path "env:PATH" -Value "$pwdpath\.gitlab;$pwdpath\.gitlab\cmake\bin;$env:PATH" - cmake --version - ninja --version -- cgit v1.2.1