Commit a1782c10 authored by Ben Boeckel's avatar Ben Boeckel

ci: add support for Windows to CI scripts

parent 95b597d9
$erroractionpreference = "stop"
$version = "3.17.3"
$sha256sum = "8A02DE221AA96C236A947B28CA1BD6327B9BB82FA74B91E5CAA49FFD6A642AE2"
$filename = "cmake-$version-win64-x64"
$tarball = "$filename.zip"
$outdir = $pwd.Path
$outdir = "$outdir\.gitlab"
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) {
exit 1
}
Add-Type -AssemblyName System.IO.Compression.FileSystem
[System.IO.Compression.ZipFile]::ExtractToDirectory("$outdir\$tarball", "$outdir")
Move-Item -Path "$outdir\$filename" -Destination "$outdir\cmake"
......@@ -8,7 +8,11 @@ cmake_minimum_required(VERSION 3.12)
set(data_host "https://data.kitware.com")
# Determine the tarball to download.
if ("$ENV{CMAKE_CONFIGURATION}" MATCHES "macos")
if ("$ENV{CMAKE_CONFIGURATION}" MATCHES "vs2019")
# 20200930
set(file_item "5f7474dc50a41e3d19bb6127")
set(file_hash "866c286b3ec0c7346fbb4f26a07ea370adcb3ce2b81549af5332449fbcf49dec3661751a5c862ca350d99b0d59892affe67d7c1f22723e728ba23541a2d0de6e")
elseif ("$ENV{CMAKE_CONFIGURATION}" MATCHES "macos")
# 20200912
set(file_item "5f74716e50a41e3d19bb5ef4")
set(file_hash "26832c678d2c41f247005c0d56736933cbf12a3fed8db9449def49dbce598c8f332f070c2932ceeefeface273e32a4b323a578408fe13c9a64361a14e96d0101")
......
$erroractionpreference = "stop"
$version = "1.10.0"
$sha256sum = "919FD158C16BF135E8A850BB4046EC1CE28A7439EE08B977CD0B7F6B3463D178"
$filename = "ninja-win"
$tarball = "$filename.zip"
$outdir = $pwd.Path
$outdir = "$outdir\.gitlab"
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) {
exit 1
}
Add-Type -AssemblyName System.IO.Compression.FileSystem
[System.IO.Compression.ZipFile]::ExtractToDirectory("$outdir\$tarball", "$outdir")
$erroractionpreference = "stop"
cmd /c "`"$env:VCVARSALL`" $VCVARSPLATFORM -vcvars_ver=$VCVARSVERSION & set" |
foreach {
if ($_ -match "=") {
$v = $_.split("=")
[Environment]::SetEnvironmentVariable($v[0], $v[1])
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment