Rather than writing down the steps to build QEMU from source ourselves
let's recycle what upstream QEMU uses in their CI. This has the obvious
advantage that if QEMU changes something in their upstream CI build
process we'll pull the change automatically.
Since YAML anchors cannot be used in a cross-file scenario this patch
makes use of the '!reference' keyword which allows us go even further
and thus pick useful parts from the upstream QEMU's CI build template.
In addition, we're also able to add more intermediary steps to these
hand-picked QEMU build job sections.
Signed-off-by: Erik Skultety <eskultet(a)redhat.com>
---
ci/integration-template.yml | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/ci/integration-template.yml b/ci/integration-template.yml
index 195e9cfa5f..d1934b1469 100644
--- a/ci/integration-template.yml
+++ b/ci/integration-template.yml
@@ -1,3 +1,20 @@
+# We want to reuse QEMU's .native_build_job_template to build it from source
+include:
+ - project: 'qemu-project/qemu'
+ file: '.gitlab-ci.d/buildtest-template.yml'
+
+
+.qemu-build-template: &qemu-build-template
+ - git clone --depth 1
https://gitlab.com/qemu-project/qemu.git
+ - cd qemu
+ #
+ # QEMU's .native_build_job_template bits
+ - export TARGETS="x86_64-softmmu"
+ - export CONFIGURE_ARGS="--prefix=/usr"
+ - export MAKE_CHECK_ARGS="check-build"
+ - !reference [.native_build_job_template, before_script]
+ - !reference [.native_build_job_template, script]
+ - sudo make install
.install-deps: &install-deps
--
2.34.1