[libvirt PATCH v2 3/5] ci: Introduce a template for upstream QEMU build

Erik Skultety posted 5 patches 1 month, 2 weeks ago
[libvirt PATCH v2 3/5] ci: Introduce a template for upstream QEMU build
Posted by Erik Skultety 1 month, 2 weeks ago
This was heavily inspired by QEMU's upstream CI buildtest-template.yml.
Rather than referencing QEMU's template directly (which GitLab can do),
this patch resorts to hard-coding the build steps ourselves, solely
because there's no guarantee QEMU will keep either the template file
name or the template name from which the build steps were mostly copied
from.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
---
 ci/integration-template.yml | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/ci/integration-template.yml b/ci/integration-template.yml
index 195e9cfa5f..89fc3f0bae 100644
--- a/ci/integration-template.yml
+++ b/ci/integration-template.yml
@@ -1,3 +1,22 @@
+.qemu-build-template: &qemu-build-template
+  - git clone --depth 1 https://gitlab.com/qemu-project/qemu.git
+  - cd qemu
+  #
+  # inspired by upstream QEMU's buildtest-template.yml
+  - export JOBS="$(expr $(nproc) + 1)"
+  - mkdir build
+  - cd build
+  - ../configure --prefix=/usr
+                 --enable-werror
+                 --disable-tcg
+                 --disable-docs
+                 --target-list=x86_64-softmmu || (cat config.log meson-logs/meson-log.txt && exit 1)
+  - make -j"$JOBS"
+  - if test -n "$MAKE_CHECK_ARGS";
+    then
+      make -j"$JOBS" check-build;
+    fi
+  - sudo make install
 
 
 .install-deps: &install-deps
-- 
2.34.3
Re: [libvirt PATCH v2 3/5] ci: Introduce a template for upstream QEMU build
Posted by Daniel P. Berrangé 1 month, 2 weeks ago
On Thu, May 12, 2022 at 10:50:57AM +0200, Erik Skultety wrote:
> This was heavily inspired by QEMU's upstream CI buildtest-template.yml.
> Rather than referencing QEMU's template directly (which GitLab can do),
> this patch resorts to hard-coding the build steps ourselves, solely
> because there's no guarantee QEMU will keep either the template file
> name or the template name from which the build steps were mostly copied
> from.
> 
> Signed-off-by: Erik Skultety <eskultet@redhat.com>
> ---
>  ci/integration-template.yml | 19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


With 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 :|

Re: [libvirt PATCH v2 3/5] ci: Introduce a template for upstream QEMU build
Posted by Erik Skultety 1 month, 2 weeks ago
On Thu, May 12, 2022 at 10:04:07AM +0100, Daniel P. Berrangé wrote:
> On Thu, May 12, 2022 at 10:50:57AM +0200, Erik Skultety wrote:
> > This was heavily inspired by QEMU's upstream CI buildtest-template.yml.
> > Rather than referencing QEMU's template directly (which GitLab can do),
> > this patch resorts to hard-coding the build steps ourselves, solely
> > because there's no guarantee QEMU will keep either the template file
> > name or the template name from which the build steps were mostly copied
> > from.
> > 
> > Signed-off-by: Erik Skultety <eskultet@redhat.com>
> > ---
> >  ci/integration-template.yml | 19 +++++++++++++++++++
> >  1 file changed, 19 insertions(+)
> 
> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>

Pushed, thanks.

Erik