diff options
author | Brad King <brad.king@kitware.com> | 2022-10-24 20:53:54 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-11-02 21:16:46 (GMT) |
commit | 01c58daec73ec3c78f9115d8055f6e16347f8446 (patch) | |
tree | cdf0b164e521a7383e688c1539a6b279fe840c32 /.gitlab/ci/mingw.ps1 | |
parent | 88b14c5cf4e88bddef11ed035d6d53ae1435d990 (diff) | |
download | CMake-01c58daec73ec3c78f9115d8055f6e16347f8446.zip CMake-01c58daec73ec3c78f9115d8055f6e16347f8446.tar.gz CMake-01c58daec73ec3c78f9115d8055f6e16347f8446.tar.bz2 |
ci: add MinGW Makefiles nightly CI job
Use the MinGW/MSYS 1.0 distribution from `mingw.osdn.io`.
Diffstat (limited to '.gitlab/ci/mingw.ps1')
-rwxr-xr-x | .gitlab/ci/mingw.ps1 | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/.gitlab/ci/mingw.ps1 b/.gitlab/ci/mingw.ps1 new file mode 100755 index 0000000..672b993 --- /dev/null +++ b/.gitlab/ci/mingw.ps1 @@ -0,0 +1,23 @@ +$erroractionpreference = "stop" + +if ("$env:CMAKE_CONFIGURATION".Contains("mingw_osdn_io")) { + $filename = "mingw.osdn.io-2022-10-03" + $sha256sum = "4DCB8C351D8D855F7D3DFC2863A235042BF3DB6E69EA0BAE51FF9378189345CD" +} else { + throw ('unknown CMAKE_CONFIGURATION: ' + "$env:CMAKE_CONFIGURATION") +} +$tarball = "$filename.zip" + +$outdir = $pwd.Path +$outdir = "$outdir\.gitlab" +$ProgressPreference = 'SilentlyContinue' +Invoke-WebRequest -Uri "https://cmake.org/files/dependencies/$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\mingw" +Remove-Item "$outdir\$tarball" |