[libvirt] [PATCH v6] tests: perform cross compiler builds on GitLab CI

Daniel P. Berrangé posted 1 patch 5 years ago
Test syntax-check passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20190416101919.21648-1-berrange@redhat.com
.gitlab-ci.yml | 46 ++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 46 insertions(+)
create mode 100644 .gitlab-ci.yml
[libvirt] [PATCH v6] tests: perform cross compiler builds on GitLab CI
Posted by Daniel P. Berrangé 5 years ago
GitLab CI provides some shared build runners that use Docker containers.
This resource can usefully run cross-compiled builds since all other CI
build testing is currently x86 only, and Travis CI is already very busy
testing native builds.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 .gitlab-ci.yml | 46 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)
 create mode 100644 .gitlab-ci.yml

Changed in v6:

 - Run jobs half & half on 9 vs sid

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000000..a8a8581d9e
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,46 @@
+.job_template: &job_definition
+  script:
+    - mkdir vpath
+    - cd vpath
+    - ../autogen.sh $CONFIGURE_OPTS
+    - make -j $(getconf _NPROCESSORS_ONLN)
+
+# We could run every arch on both versions, but it is a little
+# overkill. Instead we run half the jobs on 9 and half the jobs
+# on sid to give reasonable cross-coverage.
+
+debian-9-cross-armv6l:
+  <<: *job_definition
+  image: quay.io/libvirt/buildenv-debian-9-cross-armv6l:master
+
+debian-9-cross-mipsel:
+  <<: *job_definition
+  image: quay.io/libvirt/buildenv-debian-9-cross-mipsel:master
+
+debian-9-cross-ppc64le:
+  <<: *job_definition
+  image: quay.io/libvirt/buildenv-debian-9-cross-ppc64le:master
+
+debian-9-cross-s390x:
+  <<: *job_definition
+  image: quay.io/libvirt/buildenv-debian-9-cross-s390x:master
+
+debian-sid-cross-aarch64:
+  <<: *job_definition
+  image: quay.io/libvirt/buildenv-debian-sid-cross-aarch64:master
+
+debian-sid-cross-armv7l:
+  <<: *job_definition
+  image: quay.io/libvirt/buildenv-debian-sid-cross-armv7l:master
+
+debian-sid-cross-i686:
+  <<: *job_definition
+  image: quay.io/libvirt/buildenv-debian-sid-cross-i686:master
+
+debian-sid-cross-mips64el:
+  <<: *job_definition
+  image: quay.io/libvirt/buildenv-debian-sid-cross-mips64el:master
+
+debian-sid-cross-mips:
+  <<: *job_definition
+  image: quay.io/libvirt/buildenv-debian-sid-cross-mips:master
-- 
2.20.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH v6] tests: perform cross compiler builds on GitLab CI
Posted by Andrea Bolognani 4 years, 11 months ago
On Tue, 2019-04-16 at 11:19 +0100, Daniel P. Berrangé wrote:
> +.job_template: &job_definition
> +  script:
> +    - mkdir vpath
> +    - cd vpath

We use build/ for CentOS CI and Travis CI builds, so let's stick
with that here as well.

> +    - ../autogen.sh $CONFIGURE_OPTS

We have some code to show the contents of config.log when this
steps fails in other CI environments, would it be a good idea to
have it here as well?

Everything else looks reasonable, at least based on my extremely
shallow knowledge of GitLab CI, so as far as I'm concerned we can
just merge this and fix whatever issue might pop up later.

  Reviewed-by: Andrea Bolognani <abologna@redhat.com>

-- 
Andrea Bolognani / Red Hat / Virtualization

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH v6] tests: perform cross compiler builds on GitLab CI
Posted by Daniel P. Berrangé 4 years, 11 months ago
On Tue, May 07, 2019 at 11:54:20AM +0200, Andrea Bolognani wrote:
> On Tue, 2019-04-16 at 11:19 +0100, Daniel P. Berrangé wrote:
> > +.job_template: &job_definition
> > +  script:
> > +    - mkdir vpath
> > +    - cd vpath
> 
> We use build/ for CentOS CI and Travis CI builds, so let's stick
> with that here as well.

Ok

> > +    - ../autogen.sh $CONFIGURE_OPTS
> 
> We have some code to show the contents of config.log when this
> steps fails in other CI environments, would it be a good idea to
> have it here as well?

Make it say:

    - ../autogen.sh $CONFIGURE_OPTS || (cat config.log && exit 1)


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list