gitlab-ci: Add job testing IntelLLVM 2023.1.0 compilers on Windows

This commit is contained in:
Brad King
2023-05-01 14:01:22 -04:00
parent a5fd03a53d
commit 1b44973343
9 changed files with 94 additions and 0 deletions

View File

@@ -1178,6 +1178,21 @@ t:windows-clang16.0-gnu-nmake:
CMAKE_CI_BUILD_NAME: windows_clang16.0_gnu_nmake
CMAKE_CI_JOB_NIGHTLY: "true"
t:windows-oneapi2023.1.0-ninja:
extends:
- .windows_inteloneapi_ninja
- .cmake_test_windows_external
- .windows_x86_64_tags_concurrent
- .cmake_junit_artifacts
- .run_dependent
dependencies:
- t:windows-vs2022-x64-ninja
needs:
- t:windows-vs2022-x64-ninja
variables:
CMAKE_CI_BUILD_NAME: windows_oneapi2023.1.0_ninja
CMAKE_CI_JOB_NIGHTLY: "true"
t:mingw_osdn_io-mingw_makefiles:
extends:
- .mingw_osdn_io_mingw_makefiles

1
.gitlab/.gitignore vendored
View File

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

View File

@@ -0,0 +1,5 @@
set(CMake_TEST_Java OFF CACHE BOOL "")
set(configure_no_sccache 1)
include("${CMAKE_CURRENT_LIST_DIR}/configure_external_test.cmake")

View File

@@ -0,0 +1 @@
include("${CMAKE_CURRENT_LIST_DIR}/configure_windows_intelcompiler_common.cmake")

View File

@@ -0,0 +1,9 @@
. .gitlab/ci/ninja-env.ps1
. .gitlab/ci/intel-env.ps1
$env:CC = "icx"
$env:CXX = "icx"
$env:FC = "ifx"
cmd /c "icx 2>&1" | Select -First 1
cmd /c "ifx 2>&1" | Select -First 1

4
.gitlab/ci/intel-env.ps1 Executable file
View File

@@ -0,0 +1,4 @@
$pwdpath = $pwd.Path
& "$pwsh" -File ".gitlab/ci/intel.ps1"
Invoke-Expression -Command .gitlab/ci/vcvarsall.ps1
Invoke-Expression -Command .gitlab/ci/intel-vars.ps1

9
.gitlab/ci/intel-vars.ps1 Executable file
View File

@@ -0,0 +1,9 @@
$erroractionpreference = "stop"
cmd /c "`".gitlab\intel\setvars.bat`" & set" |
foreach {
if ($_ -match "=") {
$v = $_.split("=")
[Environment]::SetEnvironmentVariable($v[0], $v[1])
}
}

42
.gitlab/ci/intel.ps1 Executable file
View File

@@ -0,0 +1,42 @@
$erroractionpreference = "stop"
if ("$env:CMAKE_CI_BUILD_NAME" -match "(^|_)oneapi2023\.1\.0(_|$)") {
# Intel oneAPI 2023.1.0
$version = "2023.1.0"
$filename = "intel-oneapi-$version-windows-1"
$sha256sum = "5AFCA9E0B03894565209B1295476163ABEBB1F1388E0F3EF5B4D0F9189E65BDC"
} else {
throw ('unknown CMAKE_CI_BUILD_NAME: ' + "$env:CMAKE_CI_BUILD_NAME")
}
$tarball = "$filename.zip"
$outdir = $pwd.Path
$outdir = "$outdir\.gitlab"
$ProgressPreference = 'SilentlyContinue'
# This URL is only visible inside of Kitware's network. See above filename table.
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\intel"
Remove-Item "$outdir\$tarball"
$compiler = "$outdir\intel\compiler"
$bin = "$compiler\$version\windows\bin"
$null = New-Item -ItemType Junction -Path "$compiler\latest" -Target "$compiler\$version"
$null = New-Item -ItemType HardLink -Path "$bin\icx-cl.exe" -Target "$bin\icx.exe"
$null = New-Item -ItemType HardLink -Path "$bin\icx-cc.exe" -Target "$bin\icx.exe"
$null = New-Item -ItemType HardLink -Path "$bin\icpx.exe" -Target "$bin\icx.exe"
$bin = "$compiler\$version\windows\bin-llvm"
$null = New-Item -ItemType HardLink -Path "$bin\clang-cl.exe" -Target "$bin\clang.exe"
$null = New-Item -ItemType HardLink -Path "$bin\clang-cpp.exe" -Target "$bin\clang.exe"
$null = New-Item -ItemType HardLink -Path "$bin\clang++.exe" -Target "$bin\clang.exe"
$null = New-Item -ItemType HardLink -Path "$bin\lld-link.exe" -Target "$bin\lld.exe"
$null = New-Item -ItemType HardLink -Path "$bin\ld.lld.exe" -Target "$bin\lld.exe"
$null = New-Item -ItemType HardLink -Path "$bin\llvm-lib.exe" -Target "$bin\llvm-ar.exe"
Clear-Variable -Name bin
Clear-Variable -Name compiler

View File

@@ -222,6 +222,14 @@
variables:
CMAKE_CONFIGURATION: windows_msvc_v71_nmake
.windows_inteloneapi_ninja:
extends:
- .windows_ninja
- .windows_vcvarsall_vs2022_x64
variables:
CMAKE_CONFIGURATION: windows_inteloneapi_ninja
.windows_openwatcom:
extends: .windows