diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2023-09-12 15:01:03 (GMT) |
---|---|---|
committer | Kyle Edwards <kyle.edwards@kitware.com> | 2023-09-22 13:30:52 (GMT) |
commit | d9f1431f92a6c2291321ee75bf9571b5a82c9471 (patch) | |
tree | b351e839fe0d45f33748f58c0e5ffbb31d457bd6 /.gitlab | |
parent | 879d12a29d253ff3a50af5536e4269140c8a7a4c (diff) | |
download | CMake-d9f1431f92a6c2291321ee75bf9571b5a82c9471.zip CMake-d9f1431f92a6c2291321ee75bf9571b5a82c9471.tar.gz CMake-d9f1431f92a6c2291321ee75bf9571b5a82c9471.tar.bz2 |
ci: Add jobs that run in symlink trees
Diffstat (limited to '.gitlab')
-rw-r--r-- | .gitlab/ci/configure_debian12_ninja_multi_symlinked.cmake | 3 | ||||
-rw-r--r-- | .gitlab/ci/configure_fedora38_makefiles_symlinked.cmake | 2 | ||||
-rw-r--r-- | .gitlab/ci/configure_macos_arm64_ninja_symlinked.cmake | 2 | ||||
-rw-r--r-- | .gitlab/ci/configure_macos_arm64_xcode_symlinked.cmake | 2 | ||||
-rw-r--r-- | .gitlab/ci/configure_symlinked_common.cmake | 7 | ||||
-rw-r--r-- | .gitlab/ci/env.sh | 10 | ||||
-rw-r--r-- | .gitlab/ci/env_debian12_ninja_multi_symlinked.sh | 5 | ||||
-rw-r--r-- | .gitlab/ci/env_fedora38_makefiles_symlinked.cmake | 1 | ||||
-rw-r--r-- | .gitlab/ci/env_fedora38_makefiles_symlinked.sh | 1 | ||||
-rw-r--r-- | .gitlab/ci/env_macos_arm64_ninja_symlinked.sh | 1 | ||||
-rw-r--r-- | .gitlab/ci/gitlab_ci.cmake | 5 | ||||
-rw-r--r-- | .gitlab/os-linux.yml | 20 | ||||
-rw-r--r-- | .gitlab/os-macos.yml | 19 |
13 files changed, 78 insertions, 0 deletions
diff --git a/.gitlab/ci/configure_debian12_ninja_multi_symlinked.cmake b/.gitlab/ci/configure_debian12_ninja_multi_symlinked.cmake new file mode 100644 index 0000000..cf9202d --- /dev/null +++ b/.gitlab/ci/configure_debian12_ninja_multi_symlinked.cmake @@ -0,0 +1,3 @@ +include("${CMAKE_CURRENT_LIST_DIR}/configure_symlinked_common.cmake") +include("${CMAKE_CURRENT_LIST_DIR}/configure_debian12_ninja_common.cmake") +set(CMake_TEST_UseSWIG "OFF" CACHE BOOL "") diff --git a/.gitlab/ci/configure_fedora38_makefiles_symlinked.cmake b/.gitlab/ci/configure_fedora38_makefiles_symlinked.cmake new file mode 100644 index 0000000..177bbcf --- /dev/null +++ b/.gitlab/ci/configure_fedora38_makefiles_symlinked.cmake @@ -0,0 +1,2 @@ +include("${CMAKE_CURRENT_LIST_DIR}/configure_symlinked_common.cmake") +include("${CMAKE_CURRENT_LIST_DIR}/configure_fedora38_common.cmake") diff --git a/.gitlab/ci/configure_macos_arm64_ninja_symlinked.cmake b/.gitlab/ci/configure_macos_arm64_ninja_symlinked.cmake new file mode 100644 index 0000000..63d0dc7 --- /dev/null +++ b/.gitlab/ci/configure_macos_arm64_ninja_symlinked.cmake @@ -0,0 +1,2 @@ +include("${CMAKE_CURRENT_LIST_DIR}/configure_symlinked_common.cmake") +include("${CMAKE_CURRENT_LIST_DIR}/configure_macos_arm64_ninja.cmake") diff --git a/.gitlab/ci/configure_macos_arm64_xcode_symlinked.cmake b/.gitlab/ci/configure_macos_arm64_xcode_symlinked.cmake new file mode 100644 index 0000000..66b18e1 --- /dev/null +++ b/.gitlab/ci/configure_macos_arm64_xcode_symlinked.cmake @@ -0,0 +1,2 @@ +include("${CMAKE_CURRENT_LIST_DIR}/configure_symlinked_common.cmake") +include("${CMAKE_CURRENT_LIST_DIR}/configure_macos_arm64_xcode.cmake") diff --git a/.gitlab/ci/configure_symlinked_common.cmake b/.gitlab/ci/configure_symlinked_common.cmake new file mode 100644 index 0000000..a5e427e --- /dev/null +++ b/.gitlab/ci/configure_symlinked_common.cmake @@ -0,0 +1,7 @@ +# Ensure that the symlink tree is set up correctly. +if(NOT CMAKE_SOURCE_DIR STREQUAL "$ENV{CI_PROJECT_DIR}/work/cmake") + message(FATAL_ERROR "Expected value of CMAKE_SOURCE_DIR:\n $ENV{CI_PROJECT_DIR}/work/cmake\nActual value:\n ${CMAKE_SOURCE_DIR}") +endif() +if(NOT CMAKE_BINARY_DIR STREQUAL "$ENV{CI_PROJECT_DIR}/work/build") + message(FATAL_ERROR "Expected value of CMAKE_BINARY_DIR:\n $ENV{CI_PROJECT_DIR}/work/build\nActual value:\n ${CMAKE_BINARY_DIR}") +endif() diff --git a/.gitlab/ci/env.sh b/.gitlab/ci/env.sh index 7634f5d..aa709a8 100644 --- a/.gitlab/ci/env.sh +++ b/.gitlab/ci/env.sh @@ -9,6 +9,16 @@ quietly() { rm -f "$log" } +if test -n "$CMAKE_CI_IN_SYMLINK_TREE"; then + mkdir -p "$CI_PROJECT_DIR/real_work/work/build" + ln -s real_work/work "$CI_PROJECT_DIR/work" + git worktree prune + git worktree add "$CI_PROJECT_DIR/work/cmake" HEAD + + # Assert that the hash matches. + test "$(git -C "$CI_PROJECT_DIR/work/cmake" rev-parse HEAD)" = "$(git -C "$CI_PROJECT_DIR" rev-parse HEAD)" +fi + if test -r ".gitlab/ci/env_${CMAKE_CONFIGURATION}.sh"; then source ".gitlab/ci/env_${CMAKE_CONFIGURATION}.sh" fi diff --git a/.gitlab/ci/env_debian12_ninja_multi_symlinked.sh b/.gitlab/ci/env_debian12_ninja_multi_symlinked.sh new file mode 100644 index 0000000..2b8ff2a --- /dev/null +++ b/.gitlab/ci/env_debian12_ninja_multi_symlinked.sh @@ -0,0 +1,5 @@ +export MY_RUBY_HOME="/usr/local/rvm/rubies/ruby-3.2.2" + +if test -z "$CI_MERGE_REQUEST_ID"; then + source .gitlab/ci/swift-env.sh +fi diff --git a/.gitlab/ci/env_fedora38_makefiles_symlinked.cmake b/.gitlab/ci/env_fedora38_makefiles_symlinked.cmake new file mode 100644 index 0000000..2accabf --- /dev/null +++ b/.gitlab/ci/env_fedora38_makefiles_symlinked.cmake @@ -0,0 +1 @@ +include("${CMAKE_CURRENT_LIST_DIR}/env_fedora38_makefiles.cmake") diff --git a/.gitlab/ci/env_fedora38_makefiles_symlinked.sh b/.gitlab/ci/env_fedora38_makefiles_symlinked.sh new file mode 100644 index 0000000..452d3785 --- /dev/null +++ b/.gitlab/ci/env_fedora38_makefiles_symlinked.sh @@ -0,0 +1 @@ +. .gitlab/ci/env_fedora38_makefiles.sh diff --git a/.gitlab/ci/env_macos_arm64_ninja_symlinked.sh b/.gitlab/ci/env_macos_arm64_ninja_symlinked.sh new file mode 100644 index 0000000..b78cefc --- /dev/null +++ b/.gitlab/ci/env_macos_arm64_ninja_symlinked.sh @@ -0,0 +1 @@ +. .gitlab/ci/env_macos_arm64_ninja.sh diff --git a/.gitlab/ci/gitlab_ci.cmake b/.gitlab/ci/gitlab_ci.cmake index 080c93b..d0d4a59 100644 --- a/.gitlab/ci/gitlab_ci.cmake +++ b/.gitlab/ci/gitlab_ci.cmake @@ -5,8 +5,13 @@ endif () # Set up the source and build paths. set(CTEST_SOURCE_DIRECTORY "$ENV{CI_PROJECT_DIR}") +if("$ENV{CMAKE_CI_IN_SYMLINK_TREE}") + set(CTEST_SOURCE_DIRECTORY "$ENV{CI_PROJECT_DIR}/work/cmake") +endif() if("$ENV{CMAKE_CI_INPLACE}") set(CTEST_BINARY_DIRECTORY "${CTEST_SOURCE_DIRECTORY}") +elseif("$ENV{CMAKE_CI_IN_SYMLINK_TREE}") + set(CTEST_BINARY_DIRECTORY "$ENV{CI_PROJECT_DIR}/work/build") else() set(CTEST_BINARY_DIRECTORY "${CTEST_SOURCE_DIRECTORY}/build") endif() diff --git a/.gitlab/os-linux.yml b/.gitlab/os-linux.yml index d42340c..0e1f933 100644 --- a/.gitlab/os-linux.yml +++ b/.gitlab/os-linux.yml @@ -137,6 +137,16 @@ CMAKE_CI_NO_INSTALL: 1 CTEST_NO_WARNINGS_ALLOWED: 1 +.debian12_ninja_multi_symlinked: + extends: .debian12 + + variables: + CMAKE_CONFIGURATION: debian12_ninja_multi_symlinked + CMAKE_GENERATOR: "Ninja Multi-Config" + CTEST_NO_WARNINGS_ALLOWED: 1 + CMAKE_CI_IN_SYMLINK_TREE: 1 + CMAKE_CI_BUILD_DIR: "real_work/work/build" + .debian12_extdeps: extends: .debian12 @@ -185,6 +195,16 @@ CTEST_NO_WARNINGS_ALLOWED: 1 CMAKE_GENERATOR: "Unix Makefiles" +.fedora38_makefiles_symlinked: + extends: .fedora38 + + variables: + CMAKE_CONFIGURATION: fedora38_makefiles_symlinked + CTEST_NO_WARNINGS_ALLOWED: 1 + CMAKE_GENERATOR: "Unix Makefiles" + CMAKE_CI_IN_SYMLINK_TREE: 1 + CMAKE_CI_BUILD_DIR: "real_work/work/build" + ### Clang Compiler .debian12_makefiles_clang: diff --git a/.gitlab/os-macos.yml b/.gitlab/os-macos.yml index fbba288..9212ecc 100644 --- a/.gitlab/os-macos.yml +++ b/.gitlab/os-macos.yml @@ -38,6 +38,15 @@ CMAKE_CONFIGURATION: macos_arm64_ninja CTEST_NO_WARNINGS_ALLOWED: 1 +.macos_arm64_ninja_symlinked: + extends: .macos_build + + variables: + CMAKE_CONFIGURATION: macos_arm64_ninja_symlinked + CTEST_NO_WARNINGS_ALLOWED: 1 + CMAKE_CI_IN_SYMLINK_TREE: 1 + CMAKE_CI_BUILD_DIR: "real_work/work/build" + .macos_arm64_pch: extends: .macos_arm64_ninja @@ -86,6 +95,16 @@ CMAKE_GENERATOR: Xcode CMAKE_CI_NIGHTLY_IGNORE_DEPS: "true" +.macos_arm64_xcode_symlinked: + extends: .macos + + variables: + CMAKE_CONFIGURATION: macos_arm64_xcode_symlinked + CMAKE_GENERATOR: Xcode + CMAKE_CI_NIGHTLY_IGNORE_DEPS: "true" + CMAKE_CI_IN_SYMLINK_TREE: 1 + CMAKE_CI_BUILD_DIR: "real_work/work/build" + .macos_arm64_xcode_ub: extends: .macos |