diff options
author | Brad King <brad.king@kitware.com> | 2022-03-02 14:16:18 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-03-02 14:47:02 (GMT) |
commit | b88f7aad639a46ea43bfe2ac9246d1c9bdbb9c0a (patch) | |
tree | b59d57adb75ce69ba49a02564a83b735693747a6 /.gitlab | |
parent | 2a7ac62c04f2c4417306a505123a675baef82c8e (diff) | |
download | CMake-b88f7aad639a46ea43bfe2ac9246d1c9bdbb9c0a.zip CMake-b88f7aad639a46ea43bfe2ac9246d1c9bdbb9c0a.tar.gz CMake-b88f7aad639a46ea43bfe2ac9246d1c9bdbb9c0a.tar.bz2 |
ci: add nightly CI job to build CMake in-place
Diffstat (limited to '.gitlab')
-rw-r--r-- | .gitlab/ci/configure_common.cmake | 9 | ||||
-rw-r--r-- | .gitlab/ci/configure_debian10_makefiles_inplace.cmake | 1 | ||||
-rw-r--r-- | .gitlab/ci/ctest_standalone.cmake | 4 | ||||
-rw-r--r-- | .gitlab/ci/gitlab_ci.cmake | 6 | ||||
-rw-r--r-- | .gitlab/os-linux.yml | 24 |
5 files changed, 42 insertions, 2 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_standalone.cmake b/.gitlab/ci/ctest_standalone.cmake index cec2de2..9199693 100644 --- a/.gitlab/ci/ctest_standalone.cmake +++ b/.gitlab/ci/ctest_standalone.cmake @@ -23,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}" 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 482ca7d..f6a8a19 100644 --- a/.gitlab/os-linux.yml +++ b/.gitlab/os-linux.yml @@ -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 |