summaryrefslogtreecommitdiffstats
path: root/.gitlab
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-03-03 16:43:53 (GMT)
committerKitware Robot <kwrobot@kitware.com>2022-03-03 16:43:59 (GMT)
commit5e05e6111ebc16b1b072308e8c7a57e2c2362b21 (patch)
treebdc1236bf66c6a9132794527387adc628bf15781 /.gitlab
parente5f5e05981b9c2db2a9e73b9308267de179ea4d4 (diff)
parentb88f7aad639a46ea43bfe2ac9246d1c9bdbb9c0a (diff)
downloadCMake-5e05e6111ebc16b1b072308e8c7a57e2c2362b21.zip
CMake-5e05e6111ebc16b1b072308e8c7a57e2c2362b21.tar.gz
CMake-5e05e6111ebc16b1b072308e8c7a57e2c2362b21.tar.bz2
Merge topic 'ci-inplace'
b88f7aad63 ci: add nightly CI job to build CMake in-place 2a7ac62c04 ci: Compute processor count earlier in ctest_standalone.cmake 1613d87dee ci: Rename ctest_test_external.cmake to ctest_standalone.cmake ac37e99453 ci: Rename variable CMake_SKIP_INSTALL to CMAKE_CI_NO_INSTALL Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !7033
Diffstat (limited to '.gitlab')
-rw-r--r--.gitlab/ci/configure_common.cmake9
-rw-r--r--.gitlab/ci/configure_debian10_makefiles_inplace.cmake1
-rw-r--r--.gitlab/ci/ctest_build.cmake2
-rw-r--r--.gitlab/ci/ctest_standalone.cmake (renamed from .gitlab/ci/ctest_test_external.cmake)20
-rw-r--r--.gitlab/ci/gitlab_ci.cmake6
-rw-r--r--.gitlab/os-linux.yml36
-rw-r--r--.gitlab/os-macos.yml6
-rw-r--r--.gitlab/os-windows.yml14
8 files changed, 67 insertions, 27 deletions
diff --git a/.gitlab/ci/configure_common.cmake b/.gitlab/ci/configure_common.cmake
index a711f3b..ed3d18d 100644
--- a/.gitlab/ci/configure_common.cmake
+++ b/.gitlab/ci/configure_common.cmake
@@ -1,4 +1,11 @@
-set(CTEST_USE_LAUNCHERS "ON" CACHE BOOL "")
+if("$ENV{CMAKE_CI_BOOTSTRAP}")
+ # Launchers do not work during bootstrap: no ctest available.
+ set(CTEST_USE_LAUNCHERS "OFF" CACHE BOOL "")
+ # We configure by bootstrapping, so skip the BootstrapTest.
+ set(CMAKE_SKIP_BOOTSTRAP_TEST ON CACHE BOOL "")
+else()
+ set(CTEST_USE_LAUNCHERS "ON" CACHE BOOL "")
+endif()
# We run the install right after the build. Avoid rerunning it when installing.
set(CMAKE_SKIP_INSTALL_ALL_DEPENDENCY "ON" CACHE BOOL "")
diff --git a/.gitlab/ci/configure_debian10_makefiles_inplace.cmake b/.gitlab/ci/configure_debian10_makefiles_inplace.cmake
new file mode 100644
index 0000000..33f0db0
--- /dev/null
+++ b/.gitlab/ci/configure_debian10_makefiles_inplace.cmake
@@ -0,0 +1 @@
+include("${CMAKE_CURRENT_LIST_DIR}/configure_common.cmake")
diff --git a/.gitlab/ci/ctest_build.cmake b/.gitlab/ci/ctest_build.cmake
index e7a0985..4bb2924 100644
--- a/.gitlab/ci/ctest_build.cmake
+++ b/.gitlab/ci/ctest_build.cmake
@@ -37,7 +37,7 @@ if ("$ENV{CTEST_NO_WARNINGS_ALLOWED}" AND num_warnings GREATER 0)
"Found ${num_warnings} warnings (treating as fatal).")
endif ()
-if (NOT "$ENV{CMake_SKIP_INSTALL}")
+if (NOT "$ENV{CMAKE_CI_NO_INSTALL}")
ctest_build(APPEND
TARGET install
RETURN_VALUE install_result)
diff --git a/.gitlab/ci/ctest_test_external.cmake b/.gitlab/ci/ctest_standalone.cmake
index 48e910b..9199693 100644
--- a/.gitlab/ci/ctest_test_external.cmake
+++ b/.gitlab/ci/ctest_standalone.cmake
@@ -6,6 +6,14 @@ include("${CMAKE_CURRENT_LIST_DIR}/env_$ENV{CMAKE_CONFIGURATION}.cmake" OPTIONAL
set(cmake_args
-C "${CMAKE_CURRENT_LIST_DIR}/configure_$ENV{CMAKE_CONFIGURATION}.cmake")
+include(ProcessorCount)
+ProcessorCount(nproc)
+if (NOT "$ENV{CTEST_MAX_PARALLELISM}" STREQUAL "")
+ if (nproc GREATER "$ENV{CTEST_MAX_PARALLELISM}")
+ set(nproc "$ENV{CTEST_MAX_PARALLELISM}")
+ endif ()
+endif ()
+
# Create an entry in CDash.
ctest_start("${ctest_model}" GROUP "${ctest_group}")
@@ -15,6 +23,10 @@ set(CTEST_UPDATE_VERSION_ONLY ON)
set(CTEST_UPDATE_COMMAND "${GIT_EXECUTABLE}")
ctest_update()
+if("$ENV{CMAKE_CI_BOOTSTRAP}")
+ set(CTEST_CONFIGURE_COMMAND "\"${CTEST_SOURCE_DIRECTORY}/bootstrap\" --parallel=${nproc}")
+endif()
+
# Configure the project.
ctest_configure(
OPTIONS "${cmake_args}"
@@ -33,14 +45,6 @@ if (configure_result)
"Failed to configure")
endif ()
-include(ProcessorCount)
-ProcessorCount(nproc)
-if (NOT "$ENV{CTEST_MAX_PARALLELISM}" STREQUAL "")
- if (nproc GREATER "$ENV{CTEST_MAX_PARALLELISM}")
- set(nproc "$ENV{CTEST_MAX_PARALLELISM}")
- endif ()
-endif ()
-
if (CTEST_CMAKE_GENERATOR STREQUAL "Unix Makefiles")
set(CTEST_BUILD_FLAGS "-j${nproc} -l${nproc}")
elseif (CTEST_CMAKE_GENERATOR MATCHES "Ninja")
diff --git a/.gitlab/ci/gitlab_ci.cmake b/.gitlab/ci/gitlab_ci.cmake
index 697162c..080c93b 100644
--- a/.gitlab/ci/gitlab_ci.cmake
+++ b/.gitlab/ci/gitlab_ci.cmake
@@ -5,7 +5,11 @@ endif ()
# Set up the source and build paths.
set(CTEST_SOURCE_DIRECTORY "$ENV{CI_PROJECT_DIR}")
-set(CTEST_BINARY_DIRECTORY "${CTEST_SOURCE_DIRECTORY}/build")
+if("$ENV{CMAKE_CI_INPLACE}")
+ set(CTEST_BINARY_DIRECTORY "${CTEST_SOURCE_DIRECTORY}")
+else()
+ set(CTEST_BINARY_DIRECTORY "${CTEST_SOURCE_DIRECTORY}/build")
+endif()
if (NOT "$ENV{CTEST_SOURCE_SUBDIRECTORY}" STREQUAL "")
string(APPEND CTEST_SOURCE_DIRECTORY "/$ENV{CTEST_SOURCE_SUBDIRECTORY}")
endif ()
diff --git a/.gitlab/os-linux.yml b/.gitlab/os-linux.yml
index f53f6f9..f6a8a19 100644
--- a/.gitlab/os-linux.yml
+++ b/.gitlab/os-linux.yml
@@ -57,7 +57,7 @@
variables:
CMAKE_CONFIGURATION: debian10_iwyu
CTEST_NO_WARNINGS_ALLOWED: 1
- CMake_SKIP_INSTALL: 1
+ CMAKE_CI_NO_INSTALL: 1
.debian10_aarch64:
image: "kitware/cmake:ci-debian10-aarch64-2022-02-21"
@@ -83,7 +83,7 @@
variables:
CMAKE_CONFIGURATION: fedora35_tidy
CTEST_NO_WARNINGS_ALLOWED: 1
- CMake_SKIP_INSTALL: 1
+ CMAKE_CI_NO_INSTALL: 1
.fedora35_clang_analyzer:
extends: .fedora35
@@ -92,7 +92,7 @@
CMAKE_CONFIGURATION: fedora35_clang_analyzer
CMAKE_CI_BUILD_TYPE: Debug
CTEST_NO_WARNINGS_ALLOWED: 1
- CMake_SKIP_INSTALL: 1
+ CMAKE_CI_NO_INSTALL: 1
.fedora35_sphinx:
extends: .fedora35
@@ -101,7 +101,7 @@
CMAKE_CONFIGURATION: fedora35_sphinx
CTEST_NO_WARNINGS_ALLOWED: 1
CTEST_SOURCE_SUBDIRECTORY: "Utilities/Sphinx"
- CMake_SKIP_INSTALL: 1
+ CMAKE_CI_NO_INSTALL: 1
.fedora35_sphinx_package:
extends: .fedora35
@@ -126,6 +126,17 @@
CMAKE_CONFIGURATION: debian10_aarch64_ninja
CTEST_NO_WARNINGS_ALLOWED: 1
+.debian10_makefiles_inplace:
+ extends: .debian10
+
+ variables:
+ CMAKE_CONFIGURATION: debian10_makefiles_inplace
+ CMAKE_GENERATOR: "Unix Makefiles"
+ CMAKE_CI_BOOTSTRAP: 1
+ CMAKE_CI_INPLACE: 1
+ CMAKE_CI_NO_INSTALL: 1
+ CTEST_NO_WARNINGS_ALLOWED: 1
+
.fedora35_ninja:
extends: .fedora35
@@ -429,6 +440,19 @@
interruptible: true
+.cmake_build_linux_standalone:
+ stage: build
+
+ script:
+ - *before_script_linux
+ - .gitlab/ci/sccache.sh
+ - sccache --start-server
+ - sccache --show-stats
+ - "$LAUNCHER ctest --output-on-failure -V -S .gitlab/ci/ctest_standalone.cmake"
+ - sccache --show-stats
+
+ interruptible: true
+
.cmake_test_linux_release:
stage: test-ext
@@ -440,7 +464,7 @@
- .gitlab/ci/sccache.sh
- sccache --start-server
- sccache --show-stats
- - "$LAUNCHER build/install/bin/ctest --output-on-failure -V -S .gitlab/ci/ctest_test_external.cmake"
+ - "$LAUNCHER build/install/bin/ctest --output-on-failure -V -S .gitlab/ci/ctest_standalone.cmake"
- sccache --show-stats
interruptible: true
@@ -453,7 +477,7 @@
- .gitlab/ci/sccache.sh
- sccache --start-server
- sccache --show-stats
- - "$LAUNCHER build/install/bin/ctest --output-on-failure -V -S .gitlab/ci/ctest_test_external.cmake"
+ - "$LAUNCHER build/install/bin/ctest --output-on-failure -V -S .gitlab/ci/ctest_standalone.cmake"
- sccache --show-stats
interruptible: true
diff --git a/.gitlab/os-macos.yml b/.gitlab/os-macos.yml
index b0844cb..e89dba8 100644
--- a/.gitlab/os-macos.yml
+++ b/.gitlab/os-macos.yml
@@ -52,7 +52,7 @@
variables:
CMAKE_CONFIGURATION: macos_package
CTEST_NO_WARNINGS_ALLOWED: 1
- CMake_SKIP_INSTALL: 1
+ CMAKE_CI_NO_INSTALL: 1
.macos10.10_package:
extends: .macos_build
@@ -60,7 +60,7 @@
variables:
CMAKE_CONFIGURATION: macos10.10_package
CTEST_NO_WARNINGS_ALLOWED: 1
- CMake_SKIP_INSTALL: 1
+ CMAKE_CI_NO_INSTALL: 1
### External testing
@@ -182,7 +182,7 @@
# Allow the server to already be running.
- "sccache --start-server || :"
- sccache --show-stats
- - "$LAUNCHER build/install/CMake.app/Contents/bin/ctest --output-on-failure -V -S .gitlab/ci/ctest_test_external.cmake"
+ - "$LAUNCHER build/install/CMake.app/Contents/bin/ctest --output-on-failure -V -S .gitlab/ci/ctest_standalone.cmake"
- sccache --show-stats
interruptible: true
diff --git a/.gitlab/os-windows.yml b/.gitlab/os-windows.yml
index d01c828..411baa5 100644
--- a/.gitlab/os-windows.yml
+++ b/.gitlab/os-windows.yml
@@ -250,7 +250,7 @@
stage: test-ext
script:
- - build/install/bin/ctest --output-on-failure -V -S .gitlab/ci/ctest_test_external.cmake
+ - build/install/bin/ctest --output-on-failure -V -S .gitlab/ci/ctest_standalone.cmake
interruptible: true
@@ -259,7 +259,7 @@
script:
- Invoke-Expression -Command .gitlab/ci/vcvarsall.ps1
- - build/install/bin/ctest --output-on-failure -V -S .gitlab/ci/ctest_test_external.cmake
+ - build/install/bin/ctest --output-on-failure -V -S .gitlab/ci/ctest_standalone.cmake
interruptible: true
@@ -271,7 +271,7 @@
- $pwdpath = $pwd.Path
- Set-Item -Force -Path "env:PATH" -Value "$pwdpath\.gitlab\jom;$env:PATH"
- Invoke-Expression -Command .gitlab/ci/vcvarsall.ps1
- - build/install/bin/ctest --output-on-failure -V -S .gitlab/ci/ctest_test_external.cmake
+ - build/install/bin/ctest --output-on-failure -V -S .gitlab/ci/ctest_standalone.cmake
interruptible: true
@@ -282,7 +282,7 @@
- Invoke-Expression -Command .gitlab/ci/borland.ps1
- $pwdpath = $pwd.Path
- Set-Item -Force -Path "env:PATH" -Value "$pwdpath\.gitlab\bcc\bin;$env:PATH"
- - build/install/bin/ctest --output-on-failure -V -S .gitlab/ci/ctest_test_external.cmake
+ - build/install/bin/ctest --output-on-failure -V -S .gitlab/ci/ctest_standalone.cmake
interruptible: true
@@ -296,7 +296,7 @@
- Invoke-Expression -Command .gitlab/ci/clang.ps1
- Invoke-Expression -Command .gitlab/ci/vcvarsall.ps1
- Set-Item -Force -Path "env:PATH" -Value "$pwdpath\.gitlab\llvm\bin;$env:PATH"
- - build/install/bin/ctest --output-on-failure -V -S .gitlab/ci/ctest_test_external.cmake
+ - build/install/bin/ctest --output-on-failure -V -S .gitlab/ci/ctest_standalone.cmake
interruptible: true
@@ -306,7 +306,7 @@
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
+ - build/install/bin/ctest --output-on-failure -V -S .gitlab/ci/ctest_standalone.cmake
interruptible: true
@@ -321,6 +321,6 @@
- Set-Item -Force -Path "env:EDPATH" -Value "$pwdpath\.gitlab\watcom\eddat"
- Set-Item -Force -Path "env:WATCOM" -Value "$pwdpath\.gitlab\watcom"
- Set-Item -Force -Path "env:WLINKTMP" -Value "."
- - build/install/bin/ctest --output-on-failure -V -S .gitlab/ci/ctest_test_external.cmake
+ - build/install/bin/ctest --output-on-failure -V -S .gitlab/ci/ctest_standalone.cmake
interruptible: true