From 11903f1b5f74033d4a9a301a65dc6d7524ee4440 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 1 Nov 2021 17:30:59 -0400 Subject: ci: Add MSVC v71 NMake nightly CI job --- .gitlab-ci.yml | 14 ++++++++++ .gitlab/ci/configure_windows_msvc_common.cmake | 2 ++ .gitlab/ci/configure_windows_msvc_v71_nmake.cmake | 1 + .gitlab/ci/msvc.ps1 | 31 +++++++++++++++++++++++ .gitlab/os-windows.yml | 24 ++++++++++++++++++ 5 files changed, 72 insertions(+) create mode 100644 .gitlab/ci/configure_windows_msvc_common.cmake create mode 100644 .gitlab/ci/configure_windows_msvc_v71_nmake.cmake create mode 100755 .gitlab/ci/msvc.ps1 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ed57278..6dc9dcf 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -783,6 +783,20 @@ test:windows-borland5.8: variables: CMAKE_CI_JOB_NIGHTLY: "true" +test:windows-msvc-v71-nmake: + extends: + - .windows_msvc_v71_nmake + - .cmake_test_windows_nmake + - .windows_builder_ext_tags + - .cmake_junit_artifacts + - .run_dependent + dependencies: + - test:windows-vs2019-x64-ninja + needs: + - test:windows-vs2019-x64-ninja + variables: + CMAKE_CI_JOB_NIGHTLY: "true" + test:windows-openwatcom1.9: extends: - .windows_openwatcom1.9 diff --git a/.gitlab/ci/configure_windows_msvc_common.cmake b/.gitlab/ci/configure_windows_msvc_common.cmake new file mode 100644 index 0000000..6d66a05 --- /dev/null +++ b/.gitlab/ci/configure_windows_msvc_common.cmake @@ -0,0 +1,2 @@ +set(configure_no_sccache 1) +include("${CMAKE_CURRENT_LIST_DIR}/configure_external_test.cmake") diff --git a/.gitlab/ci/configure_windows_msvc_v71_nmake.cmake b/.gitlab/ci/configure_windows_msvc_v71_nmake.cmake new file mode 100644 index 0000000..166690a --- /dev/null +++ b/.gitlab/ci/configure_windows_msvc_v71_nmake.cmake @@ -0,0 +1 @@ +include("${CMAKE_CURRENT_LIST_DIR}/configure_windows_msvc_common.cmake") diff --git a/.gitlab/ci/msvc.ps1 b/.gitlab/ci/msvc.ps1 new file mode 100755 index 0000000..e8388a4 --- /dev/null +++ b/.gitlab/ci/msvc.ps1 @@ -0,0 +1,31 @@ +$erroractionpreference = "stop" + +if ("$env:CMAKE_CONFIGURATION".Contains("msvc_v71")) { + # MSVC v71 Toolset from Visual Studio 7 .NET 2003 + $filename = "msvc-v71-1" + $sha256sum = "01637CDC670EA5D631E169E286ACDD1913A124E3C5AF4C3DFB37657ADE8BBA9F" + $vcvars = "Vc7\bin\vcvars32.bat" +} else { + throw ('unknown CMAKE_CONFIGURATION: ' + "$env:CMAKE_CONFIGURATION") +} +$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\msvc" + +$bat = Get-Content -path "$outdir\msvc\$vcvars.in" -Raw +$bat = $bat -replace "@VS_ROOT@","$outdir\msvc" +$bat | Set-Content -path "$outdir\msvc\$vcvars" + +Set-Item -Force -Path "env:VCVARSALL" -Value "$outdir\msvc\$vcvars" diff --git a/.gitlab/os-windows.yml b/.gitlab/os-windows.yml index 298b719..7e12496 100644 --- a/.gitlab/os-windows.yml +++ b/.gitlab/os-windows.yml @@ -72,6 +72,20 @@ variables: CMAKE_CONFIGURATION: windows_borland5.8 +.windows_nmake: + extends: .windows + + variables: + CMAKE_GENERATOR: "NMake Makefiles" + CMAKE_CI_BUILD_TYPE: Release + CMAKE_CI_NIGHTLY_IGNORE_DEPS: "true" + +.windows_msvc_v71_nmake: + extends: .windows_nmake + + variables: + CMAKE_CONFIGURATION: windows_msvc_v71_nmake + .windows_openwatcom: extends: .windows @@ -171,6 +185,16 @@ interruptible: true +.cmake_test_windows_nmake: + stage: test-ext + + script: + - Invoke-Expression -Command .gitlab/ci/msvc.ps1 + - Invoke-Expression -Command .gitlab/ci/vcvarsall.ps1 + - build/install/bin/ctest --output-on-failure -V -S .gitlab/ci/ctest_test_external.cmake + + interruptible: true + .cmake_test_windows_openwatcom: stage: test-ext -- cgit v0.12