diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 71e4903c5..0b37ab400 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -34,6 +34,16 @@ stages: - pages - deploy +### +# Extra rules for packaging +.monado.packaging.conditions: + rules: + # Only the default branch of the "upstream" repo. + - if: "$CI_PROJECT_PATH == $FDO_UPSTREAM_REPO && $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH" + when: on_success + # Otherwise, don't build packages. + - when: never + # # # ### @@ -112,7 +122,6 @@ win:container_prep: - .build-rules image: $MONADO_IMAGE - # Variables for build and usage of Debian bullseye image .monado.variables.debian:bullseye: variables: @@ -278,6 +287,7 @@ reuse: debian:cmake: stage: build extends: + - .monado.packaging.conditions - .monado.image.debian:bullseye before_script: - pushd doc/changes @@ -516,15 +526,6 @@ windows: - install - build/Testing/Temporary -# Packaging -.monado.packaging.conditions: - rules: - # Only the default branch of the "upstream" repo. - - if: "$CI_PROJECT_PATH == $FDO_UPSTREAM_REPO && $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH" - when: on_success - # Otherwise, don't build packages. - - when: never - debian:bullseye:package: diff --git a/.gitlab-ci/ci.template b/.gitlab-ci/ci.template index 0a577ed5a..bc1583a33 100644 --- a/.gitlab-ci/ci.template +++ b/.gitlab-ci/ci.template @@ -50,6 +50,16 @@ stages: - pages - deploy +### +# Extra rules for packaging +.monado.packaging.conditions: + rules: + # Only the default branch of the "upstream" repo. + - if: "$CI_PROJECT_PATH == $FDO_UPSTREAM_REPO && $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH" + when: on_success + # Otherwise, don't build packages. + - when: never + {% include 'win_containers.yml' %} {% include 'ci-containers-variables.yml.jinja' %} @@ -93,6 +103,9 @@ reuse: {{job.name}}: stage: build extends: +{% if job.name == documentation_build %} + - .monado.packaging.conditions +{% endif %} - {{base_job_to_use_image(distro, image)}} {%- if job.before_script or "android" in job.name %} @@ -162,15 +175,6 @@ windows: - install - build/Testing/Temporary -# Packaging -.monado.packaging.conditions: - rules: - # Only the default branch of the "upstream" repo. - - if: "$CI_PROJECT_PATH == $FDO_UPSTREAM_REPO && $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH" - when: on_success - # Otherwise, don't build packages. - - when: never - {% macro packaging_job_name(distro, image) -%} {{distro.name}}:{{image.codename}}:package {%- endmacro %} @@ -230,7 +234,7 @@ pages: extends: - .monado.packaging.conditions needs: - - debian:cmake + - {{ documentation_build }} - reprepro:package script: - mkdir -p public diff --git a/.gitlab-ci/config.yml b/.gitlab-ci/config.yml index b50fa794c..a897c7359 100644 --- a/.gitlab-ci/config.yml +++ b/.gitlab-ci/config.yml @@ -62,6 +62,9 @@ fdo_ci_templates_sha: 7811ba9814a3bad379377241c6c6b62d78b20eac Eigen3_DIR: /usr/lib/cmake/eigen3/ EIGEN3_INCLUDE_DIR: /usr/include/eigen3 +# Which build job do we use to build the documentation. +documentation_build: "debian:cmake" + # The distributions we'll make an image for distributions: - name: debian