diff options
author | Brad King <brad.king@kitware.com> | 2020-10-01 12:46:04 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-10-01 12:46:13 (GMT) |
commit | 0519db374c79f654b55de396943cafcf36db695f (patch) | |
tree | 2474a1086833cf5f49fec55d16af32543a50f7f1 | |
parent | 2e8b85b040ebc9bd9f2ec4107a69caf6db311823 (diff) | |
parent | 1853201bfa53165ab9f27071e93a29a4313e1305 (diff) | |
download | CMake-0519db374c79f654b55de396943cafcf36db695f.zip CMake-0519db374c79f654b55de396943cafcf36db695f.tar.gz CMake-0519db374c79f654b55de396943cafcf36db695f.tar.bz2 |
Merge topic 'ci-linux-package'
1853201bfa gitlab-ci: hide modern whitespace attribute usage from old Git versions
bd83c9f073 gitlab-ci: add jobs to make Linux release packages
46b1fc2387 gitlab-ci: rename package-pipeline jobs to end in "-package"
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5286
-rw-r--r-- | .gitlab-ci.yml | 39 | ||||
-rw-r--r-- | .gitlab/os-linux.yml | 54 |
2 files changed, 85 insertions, 8 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c4c14bf..5f48a02 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -36,7 +36,7 @@ stages: # Prep jobs -prep:source: +prep:source-package: extends: - .linux_prep_source - .cmake_prep_source_linux @@ -44,7 +44,7 @@ prep:source: - .cmake_release_artifacts - .run_only_for_package -prep:doc: +prep:doc-package: extends: - .fedora31_sphinx_package - .cmake_prep_doc_linux @@ -52,14 +52,14 @@ prep:doc: - .cmake_doc_artifacts - .run_only_for_package -upload:source: +upload:source-package: extends: - .rsync_upload - .run_only_for_package dependencies: - - prep:source + - prep:source-package needs: - - prep:source + - prep:source-package variables: RSYNC_DESTINATION: dev @@ -152,6 +152,29 @@ test:fedora31-ninja-multi: needs: - test:fedora31-ninja +build:linux-x86_64-package: + extends: + - .linux_package_x86_64 + - .cmake_build_linux_package + - .cmake_release_artifacts + - .linux_builder_tags + - .run_only_for_package + dependencies: + - prep:doc-package + needs: + - prep:doc-package + +upload:linux-x86_64-package: + extends: + - .rsync_upload + - .run_only_for_package + dependencies: + - build:linux-x86_64-package + needs: + - build:linux-x86_64-package + variables: + RSYNC_DESTINATION: dev + # macOS builds build:macos-ninja: @@ -212,11 +235,11 @@ build:macos-package: - .macos_builder_tags_package - .run_only_for_package dependencies: - - prep:doc + - prep:doc-package needs: - - prep:doc + - prep:doc-package -upload:macos: +upload:macos-package: extends: - .rsync_upload - .run_only_for_package diff --git a/.gitlab/os-linux.yml b/.gitlab/os-linux.yml index 74b2de7..19b81d7 100644 --- a/.gitlab/os-linux.yml +++ b/.gitlab/os-linux.yml @@ -17,6 +17,19 @@ variables: GIT_CLONE_PATH: "$CI_BUILDS_DIR/cmake ci" +.linux_package: + variables: + GIT_CLONE_PATH: "$CI_BUILDS_DIR/cmake ci" + LAUNCHER: "scl enable devtoolset-6 rh-python36 --" + +.linux_package_x86_64: + extends: .linux_package + + image: "kitware/cmake:build-linux-x86_64-deps-2020-04-02@sha256:77e9ab183f34680990db9da5945473e288f0d6556bce79ecc1589670d656e157" + + variables: + CMAKE_ARCH: x86_64 + ### Debian .debian10: @@ -195,6 +208,42 @@ interruptible: true +.cmake_build_linux_package: + stage: build + + script: + # Bootstrap. + - cp -v Utilities/Release/linux/$CMAKE_ARCH/cache.txt build/CMakeCache.txt + # Make sccache available. + - .gitlab/ci/sccache.sh + - export PATH=$PWD/.gitlab:$PATH + # Append sccache settings to the cache. + - echo "CMAKE_C_COMPILER_LAUNCHER:STRING=sccache" >> build/CMakeCache.txt + - echo "CMAKE_CXX_COMPILER_LAUNCHER:STRING=sccache" >> build/CMakeCache.txt + # CI settings. + - echo "CMake_TEST_INSTALL:BOOL=OFF" >> build/CMakeCache.txt + - echo "CMAKE_INSTALL_PREFIX:PATH=$PWD/build/install" >> build/CMakeCache.txt + - echo "CMAKE_SKIP_INSTALL_ALL_DEPENDENCY:BOOL=ON" >> build/CMakeCache.txt + # Appease Git. The Git in this container is old (1.7) and doesn't + # understand some things. But, it doesn't need to, so make it blind. + - mkdir -p .git/info + - echo "* -crlf" >> .git/info/attributes + - git reset --hard + # Bootstrap + - cd build/ + - '$LAUNCHER ../bootstrap --parallel=$(nproc) --docdir=doc/cmake -- "-DCMake_DOC_ARTIFACT_PREFIX=$CI_PROJECT_DIR/build/install-doc"' + # FIXME: When CTest can drive an external CMake for the build as well, + # use the scripts here. + - "$LAUNCHER make -j$(nproc)" + # NOTE: This regex matches that used in the release build. + - "$LAUNCHER bin/ctest --output-on-failure -j$(nproc) -R '^(CMake\\.|CMakeLib\\.|CMakeServerLib\\.|RunCMake\\.ctest_memcheck)'" + # Make a package. + - bin/cpack -G TGZ + - bin/cpack -G STGZ + - sccache --show-stats + + interruptible: true + .cmake_build_release_linux: stage: build @@ -212,6 +261,11 @@ - echo "CMake_TEST_INSTALL:BOOL=OFF" >> build/CMakeCache.txt - echo "CMAKE_INSTALL_PREFIX:PATH=$PWD/build/install" >> build/CMakeCache.txt - echo "CMAKE_SKIP_INSTALL_ALL_DEPENDENCY:BOOL=ON" >> build/CMakeCache.txt + # Appease Git. The Git in this container is old (1.7) and doesn't + # understand some things. But, it doesn't need to, so make it blind. + - mkdir -p .git/info + - echo "* -crlf" >> .git/info/attributes + - git reset --hard # Bootstrap - cd build/ - "$LAUNCHER ../bootstrap --parallel=$(nproc) --docdir=doc/cmake" |