Currently we nine different cross build jobs, but as we introduce more native jobs this is going to result in a very long CI execution time. For developers testing their personal branches under development it is generally sufficient to just look at a couple of interesting scenarios, namely 32-bit and big endian. This splits the cross build jobs so that by default only the armv7 and s390x archs are built. The remainining archs are setup so that they are only built for code on the master branch, which will have the effect of doing post-merge testing. Developers can opt-in to full testing of their pre-merge code by pushing it to a branch with a name prefix of "ci-extra-". Signed-off-by: Daniel P. Berrangé <berrange@xxxxxxxxxx> --- .gitlab-ci.yml | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b79d9a2b77..5fa80a0458 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,6 +7,7 @@ stages: - cross_build +# Default cross build jobs that are always run .cross_build_default_job_template: &cross_build_default_job_definition stage: cross_build script: @@ -15,28 +16,33 @@ stages: - ../autogen.sh $CONFIGURE_OPTS || (cat config.log && exit 1) - $MAKE -j $(getconf _NPROCESSORS_ONLN) -# We could run every arch on every versions, but it is a little -# overkill. Instead we split jobs evenly across 9, 10 and sid -# to achieve reasonable cross-coverage. +# Extra cross build jobs that are only run post-merge, or +# when code is pushed to a branch with "ci-extra-" name prefix +.cross_build_extra_job_template: &cross_build_extra_job_definition + <<: *cross_build_default_job_definition + only: + - master + - /^ci-extra-.*$/ + debian-9-cross-armv6l: - <<: *cross_build_default_job_definition + <<: *cross_build_extra_job_definition image: quay.io/libvirt/buildenv-libvirt-debian-9-cross-armv6l:latest debian-9-cross-mips64el: - <<: *cross_build_default_job_definition + <<: *cross_build_extra_job_definition image: quay.io/libvirt/buildenv-libvirt-debian-9-cross-mips64el:latest debian-9-cross-mips: - <<: *cross_build_default_job_definition + <<: *cross_build_extra_job_definition image: quay.io/libvirt/buildenv-libvirt-debian-9-cross-mips:latest debian-10-cross-aarch64: - <<: *cross_build_default_job_definition + <<: *cross_build_extra_job_definition image: quay.io/libvirt/buildenv-libvirt-debian-10-cross-aarch64:latest debian-10-cross-ppc64le: - <<: *cross_build_default_job_definition + <<: *cross_build_extra_job_definition image: quay.io/libvirt/buildenv-libvirt-debian-10-cross-ppc64le:latest debian-10-cross-s390x: @@ -48,11 +54,11 @@ debian-sid-cross-armv7l: image: quay.io/libvirt/buildenv-libvirt-debian-sid-cross-armv7l:latest debian-sid-cross-i686: - <<: *cross_build_default_job_definition + <<: *cross_build_extra_job_definition image: quay.io/libvirt/buildenv-libvirt-debian-sid-cross-i686:latest debian-sid-cross-mipsel: - <<: *cross_build_default_job_definition + <<: *cross_build_extra_job_definition image: quay.io/libvirt/buildenv-libvirt-debian-sid-cross-mipsel:latest # This artifact published by this job is downloaded by libvirt.org to -- 2.24.1