Browse Source

gitlab-ci: add jobs to build cmake.org/cmake/help/git-{master,stage} docs

Brad King 4 years ago
parent
commit
354ae6fe2e
4 changed files with 48 additions and 0 deletions
  1. 12 0
      .gitlab-ci.yml
  2. 9 0
      .gitlab/artifacts.yml
  3. 15 0
      .gitlab/os-linux.yml
  4. 12 0
      .gitlab/rules.yml

+ 12 - 0
.gitlab-ci.yml

@@ -63,6 +63,18 @@ upload:source-package:
     variables:
         RSYNC_DESTINATION: dev
 
+# Documentation builds
+
+build:help:master:
+    extends:
+        - .cmake_org_help
+        - .run_only_for_continuous_master
+
+build:help:stage:
+    extends:
+        - .cmake_org_help
+        - .run_only_for_continuous_stage
+
 # Lint builds
 
 build:debian10-iwyu:

+ 9 - 0
.gitlab/artifacts.yml

@@ -97,3 +97,12 @@
         paths:
             # Take the install tree.
             - build/install-doc/
+
+.cmake_org_help_artifacts:
+    artifacts:
+        expire_in: 1d
+        paths:
+            - build/html
+        exclude:
+            - build/html/.buildinfo
+            - build/html/objects.inv

+ 15 - 0
.gitlab/os-linux.yml

@@ -368,3 +368,18 @@
         - .needs_centos6_x86_64
     variables:
         CMAKE_CI_JOB_NIGHTLY: "true"
+
+### Documentation
+
+.cmake_org_help:
+    stage: build
+    extends:
+        - .fedora33
+        - .linux_builder_tags
+        - .cmake_org_help_artifacts
+    script:
+        - *before_script_linux
+        - mkdir -p build/
+        - cd build/
+        - cmake ../Utilities/Sphinx -GNinja -DSPHINX_HTML=ON -DSPHINX_FLAGS="-A versionswitch=1"
+        - ninja

+ 12 - 0
.gitlab/rules.yml

@@ -62,3 +62,15 @@
         - if: '$CMAKE_CI_PACKAGE == "true"'
           when: on_success
         - when: never
+
+.run_only_for_continuous_master:
+    rules:
+        - if: '$CMAKE_CI_PROJECT_MAIN_BRANCH != null && $CI_COMMIT_BRANCH != null && $CMAKE_CI_PROJECT_MAIN_BRANCH == $CI_COMMIT_BRANCH'
+          when: on_success
+        - when: never
+
+.run_only_for_continuous_stage:
+    rules:
+        - if: '$CMAKE_CI_PROJECT_CONTINUOUS_BRANCH != null && $CI_COMMIT_BRANCH != null && $CMAKE_CI_PROJECT_CONTINUOUS_BRANCH == $CI_COMMIT_BRANCH'
+          when: on_success
+        - when: never