From bbbd4e48be19f6b22ad480b26f7095d2fa6ac410 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Wed, 25 Mar 2020 13:14:57 +0000 Subject: [PATCH] gitlab: reduce number of cross build jobs run by default MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently we have 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-full-". Reviewed-by: Erik Skultety Reviewed-by: Andrea Bolognani Signed-off-by: Daniel P. Berrangé --- .gitlab-ci.yml | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b79d9a2b77..d66b30edb0 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-full-" name prefix +.cross_build_extra_job_template: &cross_build_extra_job_definition + <<: *cross_build_default_job_definition + only: + - master + - /^ci-full-.*$/ + 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