[libvirt PATCH v2 10/35] ci: build.sh: Add a wrapper function over the 'potfile' job

Erik Skultety posted 35 patches 1 year, 3 months ago
[libvirt PATCH v2 10/35] ci: build.sh: Add a wrapper function over the 'potfile' job
Posted by Erik Skultety 1 year, 3 months ago
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>
Erik Skultety <eskultet@redhat.com>:
---
 ci/build.sh | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/ci/build.sh b/ci/build.sh
index e6c3225691..d6361f3ade 100644
--- a/ci/build.sh
+++ b/ci/build.sh
@@ -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
+}
-- 
2.41.0
Re: [libvirt PATCH v2 10/35] ci: build.sh: Add a wrapper function over the 'potfile' job
Posted by Daniel P. Berrangé 1 year, 3 months ago
On Mon, Sep 11, 2023 at 03:43:11PM +0200, Erik Skultety wrote:
> 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>
> Erik Skultety <eskultet@redhat.com>:
> ---
>  ci/build.sh | 11 +++++++++++
>  1 file changed, 11 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 :|