diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2020-06-12 16:54:06 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2020-06-12 16:59:55 (GMT) |
commit | 6d168c41e3bac2c6445977e957772772429d6fb1 (patch) | |
tree | bd0f3af8290711d7c294e68f061681ff99480f9c /.gitlab | |
parent | a1fe6ad62129c14e9dcae5c61d40bea55c81a497 (diff) | |
download | CMake-6d168c41e3bac2c6445977e957772772429d6fb1.zip CMake-6d168c41e3bac2c6445977e957772772429d6fb1.tar.gz CMake-6d168c41e3bac2c6445977e957772772429d6fb1.tar.bz2 |
gitlab-ci: split linux and macos shared before scripts
They're not actually the same anyways and the anchors can't be shared
between the files. We can figure out refactoring in the future.
Diffstat (limited to '.gitlab')
-rw-r--r-- | .gitlab/os-linux.yml | 34 | ||||
-rw-r--r-- | .gitlab/os-macos.yml | 36 | ||||
-rw-r--r-- | .gitlab/os-unix.yml | 35 |
3 files changed, 67 insertions, 38 deletions
diff --git a/.gitlab/os-linux.yml b/.gitlab/os-linux.yml index 7caf507..1c97377 100644 --- a/.gitlab/os-linux.yml +++ b/.gitlab/os-linux.yml @@ -118,6 +118,36 @@ ## Linux-specific scripts +.before_script_linux: &before_script_linux + - .gitlab/ci/cmake.sh + - .gitlab/ci/ninja.sh + - export PATH=$PWD/.gitlab:$PWD/.gitlab/cmake/bin:$PATH + - cmake --version + - ninja --version + +.cmake_build_linux: + stage: build + + script: + - *before_script_linux + - .gitlab/ci/sccache.sh + - sccache --start-server + - sccache --show-stats + - "$LAUNCHER ctest -VV -S .gitlab/ci/ctest_configure.cmake" + - "$LAUNCHER ctest -VV -S .gitlab/ci/ctest_build.cmake" + - sccache --show-stats + + interruptible: true + +.cmake_test_linux: + stage: test + + script: + - *before_script_linux + - "$LAUNCHER ctest --output-on-failure -V -S .gitlab/ci/ctest_test.cmake" + + interruptible: true + .cmake_build_release_linux: stage: build @@ -154,7 +184,7 @@ stage: test-ext script: - - *before_script_unix + - *before_script_linux # Make the CMake package available. - mkdir -p build/install - tar -C build/install --strip-components=1 -xzf build/cmake-*-Linux-x86_64.tar.gz @@ -170,7 +200,7 @@ stage: test-ext script: - - *before_script_unix + - *before_script_linux - .gitlab/ci/sccache.sh - sccache --start-server - sccache --show-stats diff --git a/.gitlab/os-macos.yml b/.gitlab/os-macos.yml index 69b1a07..9d123ec 100644 --- a/.gitlab/os-macos.yml +++ b/.gitlab/os-macos.yml @@ -66,11 +66,45 @@ ## macOS-specific scripts +.before_script_macos: &before_script_macos + - .gitlab/ci/cmake.sh + - .gitlab/ci/ninja.sh + - export PATH=$PWD/.gitlab:$PWD/.gitlab/cmake/bin:$PATH + - cmake --version + - ninja --version + # Download Qt + - cmake -P .gitlab/ci/download_qt.cmake + - export CMAKE_PREFIX_PATH=$PWD/.gitlab/qt + +.cmake_build_macos: + stage: build + + script: + - *before_script_macos + - .gitlab/ci/sccache.sh + # Allow the server to already be running. + - "sccache --start-server || :" + - sccache --show-stats + - ctest -VV -S .gitlab/ci/ctest_configure.cmake + - ctest -VV -S .gitlab/ci/ctest_build.cmake + - sccache --show-stats + + interruptible: true + +.cmake_test_macos: + stage: test + + script: + - *before_script_macos + - ctest --output-on-failure -V -S .gitlab/ci/ctest_test.cmake + + interruptible: true + .cmake_test_macos_external: stage: test-ext script: - - *before_script_unix + - *before_script_macos - .gitlab/ci/sccache.sh # Allow the server to already be running. - "sccache --start-server || :" diff --git a/.gitlab/os-unix.yml b/.gitlab/os-unix.yml deleted file mode 100644 index c1f6bb7..0000000 --- a/.gitlab/os-unix.yml +++ /dev/null @@ -1,35 +0,0 @@ -# Unix-specific build commands - -.before_script_unix: &before_script_unix - - .gitlab/ci/cmake.sh - - .gitlab/ci/ninja.sh - - export PATH=$PWD/.gitlab:$PWD/.gitlab/cmake/bin:$PATH - - cmake --version - - ninja --version - # Download Qt on macOS - - "[ \"$( uname -s )\" = \"Darwin\" ] && cmake -P .gitlab/ci/download_qt.cmake" - - "[ \"$( uname -s )\" = \"Darwin\" ] && export CMAKE_PREFIX_PATH=$PWD/.gitlab/qt" - -.cmake_build_unix: - stage: build - - script: - - *before_script_unix - - .gitlab/ci/sccache.sh - # 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" - - sccache --show-stats - - interruptible: true - -.cmake_test_unix: - stage: test - - script: - - *before_script_unix - - "$LAUNCHER ctest --output-on-failure -V -S .gitlab/ci/ctest_test.cmake" - - interruptible: true |