ci: Allow skipping dist

Instead of having an ad-hoc build script for CentOS 7, follow the
pattern established in other repositories under the libvirt group
and allow selectively disabling that specific part of the build.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Andrea Bolognani 2020-10-08 15:30:50 +02:00
parent 81e1df6acb
commit 71c97400a3

View File

@ -51,24 +51,13 @@ stages:
- *script_variables - *script_variables
script: script:
- meson build --werror || (cat build/meson-logs/meson-log.txt && exit 1) - meson build --werror || (cat build/meson-logs/meson-log.txt && exit 1)
- ninja -C build dist - if test "$DIST" != "skip";
then
# Default native build job only for CentOS 7 that is always run ninja -C build dist;
# meson dist fails on CentOS 7 because of old git that fails to clone else
# from shallow git repository which is done when running meson dist ninja -C build;
.native_build_centos_7_job_template: &native_build_centos_7_job_definition ninja -C build test;
stage: builds fi
image: $CI_REGISTRY_IMAGE/ci-$NAME:latest
cache:
paths:
- ccache/
key: "$CI_JOB_NAME"
before_script:
- *script_variables
script:
- meson build --werror || (cat build/meson-logs/meson-log.txt && exit 1)
- ninja -C build
- ninja -C build test
# Jobs that we delegate to Cirrus CI because they require an operating # Jobs that we delegate to Cirrus CI because they require an operating
# system other than Linux. These jobs will only run if the required # system other than Linux. These jobs will only run if the required
@ -305,11 +294,14 @@ x64-debian-sid:
NAME: debian-sid NAME: debian-sid
x64-centos-7: x64-centos-7:
<<: *native_build_centos_7_job_definition <<: *native_build_job_definition
needs: needs:
- x64-centos-7-container - x64-centos-7-container
variables: variables:
NAME: centos-7 NAME: centos-7
# meson dist fails on CentOS 7 because of old git that fails to clone
# from shallow git repository which is done when running meson dist
DIST: skip
x64-centos-8: x64-centos-8:
<<: *native_build_job_definition <<: *native_build_job_definition