summaryrefslogtreecommitdiff
path: root/.gitlab
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-05-01 14:01:22 -0400
committerBrad King <brad.king@kitware.com>2023-05-01 15:51:21 -0400
commit1b44973343d8a61ee30cfe9dc94b3b3c838689c6 (patch)
tree1317a0399c03cc99871f4f811e7d86e70719bd41 /.gitlab
parenta5fd03a53dda9faf4d2ef9a6a276e0aa4b5bd323 (diff)
downloadcmake-1b44973343d8a61ee30cfe9dc94b3b3c838689c6.tar.gz
gitlab-ci: Add job testing IntelLLVM 2023.1.0 compilers on Windows
Diffstat (limited to '.gitlab')
-rw-r--r--.gitlab/.gitignore1
-rw-r--r--.gitlab/ci/configure_windows_intelcompiler_common.cmake5
-rw-r--r--.gitlab/ci/configure_windows_inteloneapi_ninja.cmake1
-rwxr-xr-x.gitlab/ci/env_windows_inteloneapi_ninja.ps19
-rwxr-xr-x.gitlab/ci/intel-env.ps14
-rwxr-xr-x.gitlab/ci/intel-vars.ps19
-rwxr-xr-x.gitlab/ci/intel.ps142
-rw-r--r--.gitlab/os-windows.yml8
8 files changed, 79 insertions, 0 deletions
diff --git a/.gitlab/.gitignore b/.gitlab/.gitignore
index 381d8fea96..852dfa64d8 100644
--- a/.gitlab/.gitignore
+++ b/.gitlab/.gitignore
@@ -2,6 +2,7 @@
/5.15.1-0-202009071110*
/bcc*
/cmake*
+/intel
/ispc*
/innosetup
/jom
diff --git a/.gitlab/ci/configure_windows_intelcompiler_common.cmake b/.gitlab/ci/configure_windows_intelcompiler_common.cmake
new file mode 100644
index 0000000000..55dce1d3ed
--- /dev/null
+++ b/.gitlab/ci/configure_windows_intelcompiler_common.cmake
@@ -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")
diff --git a/.gitlab/ci/configure_windows_inteloneapi_ninja.cmake b/.gitlab/ci/configure_windows_inteloneapi_ninja.cmake
new file mode 100644
index 0000000000..c2d708baf3
--- /dev/null
+++ b/.gitlab/ci/configure_windows_inteloneapi_ninja.cmake
@@ -0,0 +1 @@
+include("${CMAKE_CURRENT_LIST_DIR}/configure_windows_intelcompiler_common.cmake")
diff --git a/.gitlab/ci/env_windows_inteloneapi_ninja.ps1 b/.gitlab/ci/env_windows_inteloneapi_ninja.ps1
new file mode 100755
index 0000000000..3bd1d46b48
--- /dev/null
+++ b/.gitlab/ci/env_windows_inteloneapi_ninja.ps1
@@ -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
diff --git a/.gitlab/ci/intel-env.ps1 b/.gitlab/ci/intel-env.ps1
new file mode 100755
index 0000000000..75f7286381
--- /dev/null
+++ b/.gitlab/ci/intel-env.ps1
@@ -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
diff --git a/.gitlab/ci/intel-vars.ps1 b/.gitlab/ci/intel-vars.ps1
new file mode 100755
index 0000000000..dde0aa26ea
--- /dev/null
+++ b/.gitlab/ci/intel-vars.ps1
@@ -0,0 +1,9 @@
+$erroractionpreference = "stop"
+
+cmd /c "`".gitlab\intel\setvars.bat`" & set" |
+foreach {
+ if ($_ -match "=") {
+ $v = $_.split("=")
+ [Environment]::SetEnvironmentVariable($v[0], $v[1])
+ }
+}
diff --git a/.gitlab/ci/intel.ps1 b/.gitlab/ci/intel.ps1
new file mode 100755
index 0000000000..50516335a8
--- /dev/null
+++ b/.gitlab/ci/intel.ps1
@@ -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
diff --git a/.gitlab/os-windows.yml b/.gitlab/os-windows.yml
index f1e86ad3e5..62542cc246 100644
--- a/.gitlab/os-windows.yml
+++ b/.gitlab/os-windows.yml
@@ -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