1 # macOS-specific builder configurations and build commands
7 GIT_CLONE_PATH: "$CI_BUILDS_DIR/cmake ci ext/$CI_CONCURRENT_ID"
8 # TODO: Factor this out so that each job selects the Xcode version to
9 # use so that different versions can be tested in a single pipeline.
10 DEVELOPER_DIR: "/Applications/Xcode-15.3.app/Contents/Developer"
11 # Avoid conflicting with other projects running on the same machine.
12 SCCACHE_SERVER_PORT: 4227
20 # Note that shell runners only support runners with a single
21 # concurrency level. We can't use `$CI_CONCURRENCY_ID` because this may
22 # change between the build and test stages which CMake doesn't support.
23 # Even if we could, it could change if other runners on the machine
24 # could run at the same time, so we drop it.
25 GIT_CLONE_PATH: "$CI_BUILDS_DIR/cmake ci"
31 CMAKE_CONFIGURATION: macos_x86_64_ninja
32 CTEST_NO_WARNINGS_ALLOWED: 1
38 CMAKE_CONFIGURATION: macos_arm64_ninja
39 CTEST_NO_WARNINGS_ALLOWED: 1
41 .macos_arm64_ninja_symlinked:
45 CMAKE_CONFIGURATION: macos_arm64_ninja_symlinked
46 CTEST_NO_WARNINGS_ALLOWED: 1
47 CMAKE_CI_IN_SYMLINK_TREE: 1
48 CMAKE_CI_BUILD_DIR: "real_work/work/build"
51 extends: .macos_arm64_ninja
54 CMAKE_CONFIGURATION: macos_arm64_pch
56 .macos_x86_64_makefiles:
60 CMAKE_CONFIGURATION: macos_x86_64_makefiles
61 CTEST_NO_WARNINGS_ALLOWED: 1
62 CMAKE_GENERATOR: "Unix Makefiles"
68 CMAKE_CONFIGURATION: macos_package
69 CTEST_NO_WARNINGS_ALLOWED: 1
70 CMAKE_CI_NO_INSTALL: 1
76 CMAKE_CONFIGURATION: macos10.10_package
77 CTEST_NO_WARNINGS_ALLOWED: 1
78 CMAKE_CI_NO_INSTALL: 1
86 CMAKE_CONFIGURATION: macos_x86_64_xcode
87 CMAKE_GENERATOR: Xcode
88 CMAKE_CI_NIGHTLY_IGNORE_DEPS: "true"
94 CMAKE_CONFIGURATION: macos_arm64_xcode
95 CMAKE_GENERATOR: Xcode
96 CMAKE_CI_NIGHTLY_IGNORE_DEPS: "true"
98 .macos_arm64_xcode_symlinked:
102 CMAKE_CONFIGURATION: macos_arm64_xcode_symlinked
103 CMAKE_GENERATOR: Xcode
104 CMAKE_CI_NIGHTLY_IGNORE_DEPS: "true"
105 CMAKE_CI_IN_SYMLINK_TREE: 1
106 CMAKE_CI_BUILD_DIR: "real_work/work/build"
108 .macos_arm64_xcode_ub:
112 CMAKE_CONFIGURATION: macos_arm64_xcode_ub
113 CMAKE_GENERATOR: Xcode
114 CMAKE_CI_NIGHTLY_IGNORE_DEPS: "true"
116 .macos_arm64_ninja_multi:
120 CMAKE_CONFIGURATION: macos_arm64_ninja_multi
121 CMAKE_GENERATOR: "Ninja Multi-Config"
122 CMAKE_CI_NIGHTLY_IGNORE_DEPS: "true"
124 .macos_x86_64_ninja_ub:
128 CMAKE_CONFIGURATION: macos_x86_64_ninja_ub
129 CMAKE_CI_NIGHTLY_IGNORE_DEPS: "true"
135 - cmake # Since this is a bare runner, pin to a project.
141 .macos_x86_64_tags_ext:
143 - cmake # Since this is a bare runner, pin to a project.
151 - cmake # Since this is a bare runner, pin to a project.
157 .macos_arm64_tags_ext:
159 - cmake # Since this is a bare runner, pin to a project.
165 .macos_arm64_tags_package:
167 - cmake # Since this is a bare runner, pin to a project.
174 ## macOS-specific scripts
176 .before_script_macos: &before_script_macos
177 - source .gitlab/ci/env.sh
178 - .gitlab/ci/cmake.sh
179 - export PATH=$PWD/.gitlab/cmake/bin:$PATH
180 - .gitlab/ci/ninja.sh
181 - export PATH=$PWD/.gitlab:$PATH
185 - cmake -P .gitlab/ci/download_qt.cmake
186 - export CMAKE_PREFIX_PATH=$PWD/.gitlab/qt${CMAKE_PREFIX_PATH:+:$CMAKE_PREFIX_PATH}
192 - *before_script_macos
193 - .gitlab/ci/sccache.sh
194 # Allow the server to already be running.
195 - "sccache --start-server || :"
196 - sccache --show-stats
197 - .gitlab/ci/pre_build.sh
198 - ctest -VV -S .gitlab/ci/ctest_configure.cmake
199 - ctest -VV -S .gitlab/ci/ctest_build.cmake
200 - .gitlab/ci/post_build.sh
201 - sccache --show-stats
209 - *before_script_macos
210 - ctest --output-on-failure -V -S .gitlab/ci/ctest_test.cmake
214 .cmake_test_macos_external:
218 - *before_script_macos
219 - .gitlab/ci/sccache.sh
220 # Allow the server to already be running.
221 - "sccache --start-server || :"
222 - sccache --show-stats
223 - "$LAUNCHER build/install/CMake.app/Contents/bin/ctest --output-on-failure -V -S .gitlab/ci/ctest_standalone.cmake"
224 - sccache --show-stats