]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
ci: build.sh: Add a wrapper function over the 'potfile' job
authorErik Skultety <eskultet@redhat.com>
Thu, 24 Aug 2023 13:48:46 +0000 (15:48 +0200)
committerErik Skultety <eskultet@redhat.com>
Tue, 12 Sep 2023 09:36:03 +0000 (11:36 +0200)
This helper is a shell function transcript of its original GitLab CI
counterpart. There's one notable difference such that we pass '-j1' to
the meson compile command otherwise we'd have to execute the 'run_build'
function twice, passing 'libvirt-pot-dep' and 'libvirt-pot' targets
in a serial manner.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
ci/build.sh

index 16492f768d6692c357763ea3acc1fbd666c5cca8..da3f6b20fcd5c31ce5e77c4f8f92a09e84bf7009 100644 (file)
@@ -65,3 +65,14 @@ run_codestyle() {
     run_build
     run_test
 }
+
+run_potfile() {
+    # since meson would run jobs for each of the following target in parallel,
+    # we'd have dependency issues such that one target might depend on a
+    # generated file which hasn't been generated yet by the other target, hence
+    # we limit potfile job to a single build job (luckily potfile build has
+    # negligible performance impact)
+    BUILD_ARGS="-j1 libvirt-pot-dep libvirt-pot"
+
+    run_build
+}