1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-05-08 22:37:04 +08:00

ci: Add scripts to provide IAR toolchains on Windows

Run `.gitlab/ci/repackage/iar.ps1` with each IAR installer and host the
package archives ourselves.
This commit is contained in:
Brad King 2024-09-04 14:33:00 -04:00
parent c07148f29f
commit 3cdf03c2e8
2 changed files with 31 additions and 0 deletions

1
.gitlab/.gitignore vendored
View File

@ -2,6 +2,7 @@
/5.15.1-0-202009071110*
/bcc*
/cmake*
/iar
/intel
/ispc*
/innosetup

30
.gitlab/ci/iar.ps1 Normal file
View File

@ -0,0 +1,30 @@
$erroractionpreference = "stop"
$ProgressPreference = 'SilentlyContinue'
Add-Type -AssemblyName System.IO.Compression.FileSystem
$outdir = $pwd.Path
$outdir = "$outdir\.gitlab"
$iar_dir = New-Item -Force -ItemType Directory -Path "$outdir\iar"
$files = @{
"bxarm-9.50.2.71951-1.zip" = "8A1C16673CEDF95DB94214159EADF06E86E66FA177149D0F379AACA88E26BC15"
"BXAVR-8102-1.zip" = "862EFD23531854506070D5647F9B32197B80E5A727304BFBD8E386A3DAADF093"
"BXRH850-3102-1.zip" = "8D1D009A0D138C7CA8431316123CB85CE1B41319A68B997F90D2E338CD469C7F"
"BXRISCV-3301-1.zip" = "59FF23F7B98EE72567A23942DE799AF137791A19BFEC102B2A59821FABBCA55A"
"BXRL78-5103-1.zip" = "00398E7197735A7B0A4310BF906808E883548814475C12D6EF2C03388F77E6A7"
"BXRX-5101-1.zip" = "D63E95ECD454B4998946C2D9DC1CB6CEF69CE15524C11A123263E6A8E88D9899"
}
foreach ($f in $files.GetEnumerator()) {
$tarball = $f.Name
# This URL is only visible inside of Kitware's network.
Invoke-WebRequest -Uri "https://cmake.org/files/dependencies/internal/iar/$tarball" -OutFile "$outdir\$tarball"
$hash = Get-FileHash "$outdir\$tarball" -Algorithm SHA256
if ($hash.Hash -ne $f.Value) {
exit 1
}
[System.IO.Compression.ZipFile]::ExtractToDirectory("$outdir\$tarball", "$iar_dir")
Remove-Item "$outdir\$tarball"
}