summaryrefslogtreecommitdiffstats
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2020-05-14 18:36:04 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2020-05-22 15:34:14 (GMT)
commit02c56b71a1f2f66be0ba79f0b3da66bfa3107ce7 (patch)
tree567b777f6fa3123c6cea3f450fafee56dc4076a2 /.gitlab-ci.yml
parenta1b1fc611bc8aeb519b79b3e1b86ce4e4dbc55e9 (diff)
downloadCMake-02c56b71a1f2f66be0ba79f0b3da66bfa3107ce7.zip
CMake-02c56b71a1f2f66be0ba79f0b3da66bfa3107ce7.tar.gz
CMake-02c56b71a1f2f66be0ba79f0b3da66bfa3107ce7.tar.bz2
gitlab-ci: add a macos builder
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml112
1 files changed, 88 insertions, 24 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 6ef553a..421c3f9 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -55,6 +55,49 @@
CTEST_NO_WARNINGS_ALLOWED: 1
CMAKE_GENERATOR: "Unix Makefiles"
+.macos: &macos
+ variables:
+ # Note that shell runners only support runners with a single
+ # concurrency level. We can't use `$CI_CONCURRENCY_ID` because this may
+ # change between the build and test stages which CMake doesn't support.
+ # Even if we could, it could change if other runners on the machine
+ # could run at the same time, so we drop it.
+ GIT_CLONE_PATH: "$CI_BUILDS_DIR/gitlab-kitware-cmake ci"
+
+.macos_ninja: &macos_ninja
+ extends: .macos
+
+ variables:
+ CMAKE_CONFIGURATION: macos_ninja
+ CTEST_NO_WARNINGS_ALLOWED: 1
+
+.macos_makefiles: &macos_makefiles
+ extends: .macos
+
+ variables:
+ CMAKE_CONFIGURATION: macos_makefiles
+ CTEST_NO_WARNINGS_ALLOWED: 1
+ CMAKE_GENERATOR: "Unix Makefiles"
+
+.linux_builder_tags: &linux_builder_tags
+ tags:
+ - build
+ - docker
+ - linux
+
+.linux_builder_tags_qt: &linux_builder_tags_qt
+ tags:
+ - build
+ - docker
+ - linux
+ - linux-3.17 # Needed to be able to load Fedora's Qt libraries.
+
+.macos_builder_tags: &macos_builder_tags
+ tags:
+ - cmake # Since this is a bare runner, pin to a project.
+ - macos
+ - shell
+
before_script:
- .gitlab/ci/cmake.sh
- .gitlab/ci/ninja.sh
@@ -65,14 +108,11 @@ before_script:
.cmake_build_unix: &cmake_build_unix
stage: build
only: *only_settings
- tags:
- - build
- - docker
- - linux
script:
- .gitlab/ci/sccache.sh
- - sccache --start-server
+ # Allow the server to already be running.
+ - "sccache --start-server || :"
- sccache --show-stats
- "$LAUNCHER ctest -VV -S .gitlab/ci/ctest_configure.cmake"
- "$LAUNCHER ctest -VV -S .gitlab/ci/ctest_build.cmake"
@@ -143,10 +183,6 @@ before_script:
.cmake_test_unix: &cmake_test_unix
stage: test
only: *only_settings
- tags:
- - build
- - docker
- - linux
script:
- "$LAUNCHER ctest --output-on-failure -V -S .gitlab/ci/ctest_test.cmake"
@@ -161,38 +197,33 @@ build:debian10-iwyu:
<<:
- *debian10_iwyu
- *cmake_build_unix
+ - *linux_builder_tags
build:fedora31-tidy:
<<:
- *fedora31_tidy
- *cmake_build_unix
+ - *linux_builder_tags
build:fedora31-sphinx:
<<:
- *fedora31_sphinx
- *cmake_build_unix
- tags:
- - build
- - docker
- - linux
- - linux-3.17 # Needed to be able to load Fedora's Qt libraries.
+ - *linux_builder_tags_qt
build:fedora31-ninja:
<<:
- *fedora31_ninja
- *cmake_build_unix
- *cmake_build_artifacts
+ - *linux_builder_tags
when: manual
test:fedora31-ninja:
<<:
- *fedora31_ninja
- *cmake_test_unix
- tags:
- - build
- - docker
- - linux
- - linux-3.17 # Needed to be able to load Fedora's Qt libraries.
+ - *linux_builder_tags_qt
dependencies:
- build:fedora31-ninja
needs:
@@ -203,18 +234,51 @@ build:fedora31-makefiles:
- *fedora31_makefiles
- *cmake_build_unix
- *cmake_build_artifacts
+ - *linux_builder_tags
when: manual
test:fedora31-makefiles:
<<:
- *fedora31_makefiles
- *cmake_test_unix
- tags:
- - build
- - docker
- - linux
- - linux-3.17 # Needed to be able to load Fedora's Qt libraries.
+ - *linux_builder_tags_qt
dependencies:
- build:fedora31-makefiles
needs:
- build:fedora31-makefiles
+
+build:macos-ninja:
+ <<:
+ - *macos_ninja
+ - *cmake_build_unix
+ - *cmake_build_artifacts
+ - *macos_builder_tags
+ when: manual
+
+test:macos-ninja:
+ <<:
+ - *macos_ninja
+ - *cmake_test_unix
+ - *macos_builder_tags
+ dependencies:
+ - build:macos-ninja
+ needs:
+ - build:macos-ninja
+
+build:macos-makefiles:
+ <<:
+ - *macos_makefiles
+ - *cmake_build_unix
+ - *cmake_build_artifacts
+ - *macos_builder_tags
+ when: manual
+
+test:macos-makefiles:
+ <<:
+ - *macos_makefiles
+ - *cmake_test_unix
+ - *macos_builder_tags
+ dependencies:
+ - build:macos-makefiles
+ needs:
+ - build:macos-makefiles