summaryrefslogtreecommitdiffstats
path: root/.gitlab/os-windows.yml
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2020-06-12 15:10:58 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2020-06-12 16:28:29 (GMT)
commitd6fe877cf988dc72853d744566ec0ce997647db9 (patch)
tree49034fc3df100ed4f0c322e3fd187243bed6d14c /.gitlab/os-windows.yml
parent0f4777ab810d87619945583ca504d49703acc0c4 (diff)
downloadCMake-d6fe877cf988dc72853d744566ec0ce997647db9.zip
CMake-d6fe877cf988dc72853d744566ec0ce997647db9.tar.gz
CMake-d6fe877cf988dc72853d744566ec0ce997647db9.tar.bz2
gitlab-ci: split into multiple files
Also add comments for sections to make it easier to figure out what's going on. Also rename the `cmake_test_unix_package` to be Linux-specific since it actually is.
Diffstat (limited to '.gitlab/os-windows.yml')
-rw-r--r--.gitlab/os-windows.yml116
1 files changed, 116 insertions, 0 deletions
diff --git a/.gitlab/os-windows.yml b/.gitlab/os-windows.yml
new file mode 100644
index 0000000..90d4685
--- /dev/null
+++ b/.gitlab/os-windows.yml
@@ -0,0 +1,116 @@
+# Windows-specific builder configurations and build commands
+
+## Base configurations
+
+.windows: &windows
+ variables:
+ GIT_CLONE_PATH: "$CI_BUILDS_DIR\\cmake ci ext\\$CI_CONCURRENT_ID"
+
+### Build and test
+
+.windows_build: &windows_build
+ extends: .windows
+
+ variables:
+ # Note that shell runners only support runners with a single
+ # concurrency level. We can't use `$CI_CONCURRENCY_ID` because this may
+ # change between the build and test stages which CMake doesn't support.
+ # Even if we could, it could change if other runners on the machine
+ # could run at the same time, so we drop it.
+ GIT_CLONE_PATH: "$CI_BUILDS_DIR\\cmake ci"
+
+.windows_ninja: &windows_ninja
+ extends: .windows_build
+
+ variables:
+ # Debug and RelWithDebinfo build types use the `/Zi` which results in
+ # uncacheable compiations.
+ # https://github.com/mozilla/sccache/issues/242
+ CMAKE_BUILD_TYPE: Release
+ CTEST_NO_WARNINGS_ALLOWED: 1
+
+.windows_vs2019_x64_ninja: &windows_vs2019_x64_ninja
+ extends: .windows_ninja
+
+ variables:
+ CMAKE_CONFIGURATION: windows_vs2019_x64_ninja
+ VCVARSALL: "${VS160COMNTOOLS}\\..\\..\\VC\\Auxiliary\\Build\\vcvarsall.bat"
+ VCVARSPLATFORM: "x64"
+ VCVARSVERSION: "14.26"
+
+### External testing
+
+.windows_vs2019_x64: &windows_vs2019_x64
+ extends: .windows
+
+ variables:
+ CMAKE_CONFIGURATION: windows_vs2019_x64
+ CMAKE_GENERATOR: "Visual Studio 16 2019"
+ CMAKE_GENERATOR_PLATFORM: "x64"
+ CMAKE_GENERATOR_TOOLSET: "v142,version=14.26"
+
+## Tags
+
+.windows_builder_tags: &windows_builder_tags
+ tags:
+ - cmake # Since this is a bare runner, pin to a project.
+ - windows
+ - shell
+ - vs2019
+ - msvc-19.25
+ - nonconcurrent
+
+.windows_builder_ext_tags: &windows_builder_ext_tags
+ tags:
+ - cmake # Since this is a bare runner, pin to a project.
+ - windows
+ - shell
+ - vs2019
+ - msvc-19.25
+ - concurrent
+
+## Windows-specific scripts
+
+.before_script_windows: &before_script_windows
+ - Invoke-Expression -Command .gitlab/ci/cmake.ps1
+ - Invoke-Expression -Command .gitlab/ci/ninja.ps1
+ - $pwdpath = $pwd.Path
+ - Set-Item -Force -Path "env:PATH" -Value "$pwdpath\.gitlab;$pwdpath\.gitlab\cmake\bin;$env:PATH"
+ - cmake --version
+ - ninja --version
+ - cmake -P .gitlab/ci/download_qt.cmake
+ - Set-Item -Force -Path "env:PATH" -Value "$pwdpath\.gitlab\qt\bin;$env:PATH"
+
+.cmake_build_windows: &cmake_build_windows
+ stage: build
+
+ script:
+ - *before_script_windows
+ - Set-Item -Force -Path "env:PATH" -Value "$env:PATH;$env:SCCACHE_PATH"
+ - Invoke-Expression -Command .gitlab/ci/vcvarsall.ps1
+ - sccache --start-server
+ - sccache --show-stats
+ - ctest -VV -S .gitlab/ci/ctest_configure.cmake
+ - ctest -VV -S .gitlab/ci/ctest_build.cmake
+ - sccache --show-stats
+ - sccache --stop-server
+
+ interruptible: true
+
+.cmake_test_windows: &cmake_test_windows
+ stage: test
+
+ script:
+ - *before_script_windows
+ - Invoke-Expression -Command .gitlab/ci/vcvarsall.ps1
+ - ctest --output-on-failure -V -S .gitlab/ci/ctest_test.cmake
+
+ interruptible: true
+
+.cmake_test_windows_external: &cmake_test_windows_external
+ stage: test-ext
+
+ script:
+ - build/install/bin/ctest --output-on-failure -V -S .gitlab/ci/ctest_test_external.cmake
+
+ interruptible: true