diff options
author | Brad King <brad.king@kitware.com> | 2023-09-25 12:57:22 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2023-09-25 12:57:30 (GMT) |
commit | 81cdf34383ffc810e539cd7ee4af00e829690361 (patch) | |
tree | 5851bfba154c49787c6a720ce785951c1a0ecae5 /.gitlab/ci/env.sh | |
parent | 82a2f198d8794a5a4c337f754c770d68d5e896a1 (diff) | |
parent | d9f1431f92a6c2291321ee75bf9571b5a82c9471 (diff) | |
download | CMake-81cdf34383ffc810e539cd7ee4af00e829690361.zip CMake-81cdf34383ffc810e539cd7ee4af00e829690361.tar.gz CMake-81cdf34383ffc810e539cd7ee4af00e829690361.tar.bz2 |
Merge topic 'tests-in-symlink-tree'
d9f1431f92 ci: Add jobs that run in symlink trees
879d12a29d ci: Always build Ninja with Unix Makefiles generator
8340313916 ci: Factor out debian12_ninja configure script
25d7843955 ci: Factor out build directory for finding artifacts
a7534c31e6 Tests: Update tests to run in multi-config generators
59b0ae6b24 Tests: Update tests to run in symlinked tree
Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8797
Diffstat (limited to '.gitlab/ci/env.sh')
-rw-r--r-- | .gitlab/ci/env.sh | 10 |
1 files changed, 10 insertions, 0 deletions
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 |