]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
ci: Introduce a template for upstream QEMU build
authorErik Skultety <eskultet@redhat.com>
Fri, 6 May 2022 07:02:23 +0000 (09:02 +0200)
committerErik Skultety <eskultet@redhat.com>
Thu, 12 May 2022 09:12:26 +0000 (11:12 +0200)
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>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
ci/integration-template.yml

index 195e9cfa5fb702f84ed859d2a10ae79be9bee873..89fc3f0bae0f7228ef103c09e3914311e97e2ca8 100644 (file)
@@ -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