diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2020-09-15 13:32:01 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2020-09-16 17:35:53 (GMT) |
commit | 7d4ec05c6f5b4d7f2b27ded68003eab2d0126199 (patch) | |
tree | 39cea602c491d29619e1dc6df305cbbb9a49c87e | |
parent | f0aaf24f0801ee5ff6107681f2740a892fa90aa1 (diff) | |
download | CMake-7d4ec05c6f5b4d7f2b27ded68003eab2d0126199.zip CMake-7d4ec05c6f5b4d7f2b27ded68003eab2d0126199.tar.gz CMake-7d4ec05c6f5b4d7f2b27ded68003eab2d0126199.tar.bz2 |
gitlab-ci: add a job to make a doc "bundle"
This can be added to any other platform's package by reusing the
artifact.
-rw-r--r-- | .gitlab-ci.yml | 8 | ||||
-rw-r--r-- | .gitlab/artifacts.yml | 7 | ||||
-rw-r--r-- | .gitlab/ci/configure_fedora31_sphinx.cmake | 8 | ||||
-rw-r--r-- | .gitlab/ci/configure_fedora31_sphinx_package.cmake | 13 | ||||
-rw-r--r-- | .gitlab/ci/configure_sphinx.cmake | 6 | ||||
-rw-r--r-- | .gitlab/os-linux.yml | 7 | ||||
-rw-r--r-- | .gitlab/rules.yml | 6 |
7 files changed, 48 insertions, 7 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ec2393b..5e7b204 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -52,6 +52,14 @@ build:fedora31-sphinx: - .linux_builder_tags_qt - .run_automatically +build:fedora31-sphinx-package: + extends: + - .fedora31_sphinx_package + - .cmake_build_linux + - .linux_builder_tags_qt + - .cmake_doc_artifacts + - .run_only_for_package + # Linux builds build:centos6-release: diff --git a/.gitlab/artifacts.yml b/.gitlab/artifacts.yml index be10e24..fb33ca7 100644 --- a/.gitlab/artifacts.yml +++ b/.gitlab/artifacts.yml @@ -79,3 +79,10 @@ paths: # Take the install tree. - build/install/ + +.cmake_doc_artifacts: + artifacts: + expire_in: 1d + paths: + # Take the install tree. + - build/install-doc/ diff --git a/.gitlab/ci/configure_fedora31_sphinx.cmake b/.gitlab/ci/configure_fedora31_sphinx.cmake index dfc9b8c..90d159b 100644 --- a/.gitlab/ci/configure_fedora31_sphinx.cmake +++ b/.gitlab/ci/configure_fedora31_sphinx.cmake @@ -1,8 +1,2 @@ -set(SPHINX_INFO ON CACHE BOOL "") -set(SPHINX_MAN ON CACHE BOOL "") -set(SPHINX_HTML ON CACHE BOOL "") -set(SPHINX_SINGLEHTML ON CACHE BOOL "") -set(SPHINX_QTHELP ON CACHE BOOL "") -set(SPHINX_TEXT ON CACHE BOOL "") - +include("${CMAKE_CURRENT_LIST_DIR}/configure_sphinx.cmake") include("${CMAKE_CURRENT_LIST_DIR}/configure_common.cmake") diff --git a/.gitlab/ci/configure_fedora31_sphinx_package.cmake b/.gitlab/ci/configure_fedora31_sphinx_package.cmake new file mode 100644 index 0000000..e839de8 --- /dev/null +++ b/.gitlab/ci/configure_fedora31_sphinx_package.cmake @@ -0,0 +1,13 @@ +# Disable formats not wanted in the package's documentation. +set(SPHINX_INFO OFF CACHE BOOL "") +set(SPHINX_SINGLEHTML OFF CACHE BOOL "") +set(SPHINX_TEXT OFF CACHE BOOL "") + +# Set the destination directory for docs that packages expect. +set(CMAKE_DOC_DIR "doc/cmake" CACHE STRING "") + +# Use a custom prefix to avoid conflicting with other builds. +set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/install-doc" CACHE PATH "") + +include("${CMAKE_CURRENT_LIST_DIR}/configure_sphinx.cmake") +include("${CMAKE_CURRENT_LIST_DIR}/configure_common.cmake") diff --git a/.gitlab/ci/configure_sphinx.cmake b/.gitlab/ci/configure_sphinx.cmake new file mode 100644 index 0000000..3750309 --- /dev/null +++ b/.gitlab/ci/configure_sphinx.cmake @@ -0,0 +1,6 @@ +set(SPHINX_INFO ON CACHE BOOL "") +set(SPHINX_MAN ON CACHE BOOL "") +set(SPHINX_HTML ON CACHE BOOL "") +set(SPHINX_SINGLEHTML ON CACHE BOOL "") +set(SPHINX_QTHELP ON CACHE BOOL "") +set(SPHINX_TEXT ON CACHE BOOL "") diff --git a/.gitlab/os-linux.yml b/.gitlab/os-linux.yml index dfd94f5..1ec5413 100644 --- a/.gitlab/os-linux.yml +++ b/.gitlab/os-linux.yml @@ -54,6 +54,13 @@ CTEST_SOURCE_SUBDIRECTORY: "Utilities/Sphinx" CMake_SKIP_INSTALL: 1 +.fedora31_sphinx_package: + extends: .fedora31 + + variables: + CMAKE_CONFIGURATION: fedora31_sphinx_package + CTEST_SOURCE_SUBDIRECTORY: "Utilities/Sphinx" + #### Build and test .fedora31_ninja: diff --git a/.gitlab/rules.yml b/.gitlab/rules.yml index 3bb8ae4..2bc4496 100644 --- a/.gitlab/rules.yml +++ b/.gitlab/rules.yml @@ -16,3 +16,9 @@ - if: '$CI_PROJECT_PATH == "cmake/cmake"' when: on_success - when: never + +.run_only_for_package: + rules: + - if: '$CMAKE_PACKAGE == "true"' + when: on_success + - when: never |