[libvirt PATCH v2 6/9] gitlab: add x86_64 native CI jobs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch adds x86_64 native CI jobs for all distros that we currently
build container images for. This is a superset of the Linux jobs run on
current Jenkins and Travis platforms.

The remaining missing platforms are FreeBSD and macOS, neither of which
can use the shared runner container based infrastructure.

We may add further native jobs in the future which are not x86_64 based,
if we get access to suitable hardware, thus the jobs all have an arch
prefix in their name, just like the cross-built jobs do.

To control the total CI execution time, we split the native jobs into
two distinct stages. A representative set of distros are used as the
primary native build sanity test, run for everyone regardless of whether
pre/post merge, and on any branch. The remaining distros are set to run
after the cross builds, and only execute for master branch, and thus
will only run for post-merge. When we switch to using a merge request
workflow, these extra jobs can be triggered when the merge request is
opened.

Signed-off-by: Daniel P. Berrangé <berrange@xxxxxxxxxx>
---
 .gitlab-ci.yml | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 78 insertions(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 329374a34f..58abcbe1f3 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,6 +1,34 @@
 stages:
   - prebuild
+  - native_build
   - cross_build
+  - native_build_extra
+
+
+# Common templates
+
+# Native jobs that run every time, pre/post merge and on any branch
+.native_build_job_template: &native_build_job_definition
+  stage: native_build
+  script:
+    - mkdir build
+    - cd build
+    - ../autogen.sh $CONFIGURE_OPTS || (cat config.log && exit 1)
+    - make -j $(getconf _NPROCESSORS_ONLN) syntax-check
+    - make -j $(getconf _NPROCESSORS_ONLN) distcheck
+
+# Native jobs that will only run post merge on master branch
+# Switch to running against merge requests later
+.native_build_extra_job_template: &native_build_extra_job_definition
+  stage: native_build_extra
+  script:
+    - mkdir build
+    - cd build
+    - ../autogen.sh $CONFIGURE_OPTS || (cat config.log && exit 1)
+    - $MAKE -j $(getconf _NPROCESSORS_ONLN) check
+  only:
+    refs:
+     - master
 
 .cross_build_job_template: &cross_build_job_definition
   stage: cross_build
@@ -10,6 +38,56 @@ stages:
     - ../autogen.sh $CONFIGURE_OPTS || (cat config.log && exit 1)
     - make -j $(getconf _NPROCESSORS_ONLN)
 
+
+# Native architecture build + test jobs
+
+x64-debian-9:
+  <<: *native_build_extra_job_definition
+  image: quay.io/libvirt/buildenv-libvirt-debian-9:latest
+
+x64-debian-10:
+  <<: *native_build_job_definition
+  image: quay.io/libvirt/buildenv-libvirt-debian-10:latest
+
+x64-debian-sid:
+  <<: *native_build_extra_job_definition
+  image: quay.io/libvirt/buildenv-libvirt-debian-sid:latest
+
+x64-centos-7:
+  <<: *native_build_job_definition
+  image: quay.io/libvirt/buildenv-libvirt-centos-7:latest
+
+x64-centos-8:
+  <<: *native_build_extra_job_definition
+  image: quay.io/libvirt/buildenv-libvirt-centos-8:latest
+
+x64-fedora-30:
+  <<: *native_build_job_definition
+  image: quay.io/libvirt/buildenv-libvirt-fedora-30:latest
+
+x64-fedora-31:
+  <<: *native_build_extra_job_definition
+  image: quay.io/libvirt/buildenv-libvirt-fedora-31:latest
+
+x64-fedora-rawhide:
+  <<: *native_build_job_definition
+  image: quay.io/libvirt/buildenv-libvirt-fedora-rawhide:latest
+
+x64-opensuse-151:
+  <<: *native_build_job_definition
+  image: quay.io/libvirt/buildenv-libvirt-opensuse-151:latest
+
+x64-ubuntu-1604:
+  <<: *native_build_job_definition
+  image: quay.io/libvirt/buildenv-libvirt-ubuntu-1604:latest
+
+x64-ubuntu-1804:
+  <<: *native_build_extra_job_definition
+  image: quay.io/libvirt/buildenv-libvirt-ubuntu-1804:latest
+
+
+# Cross compiled build jobs
+
 # There are many possible cross-arch jobs we could do, but to preserve
 # limited CI resource time allocated to users, we cut it down to two
 # interesting variants. The default jobs are x86_64, which means 64-bit
-- 
2.24.1





[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux