On Thu, Aug 31, 2023 at 05:55:21PM +0100, Daniel P. Berrangé wrote:
On Fri, Aug 25, 2023 at 07:55:18PM +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(a)redhat.com>
> ---
> ci/build.sh | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/ci/build.sh b/ci/build.sh
> index b2891a0c0f..6990f2d171 100644
> --- a/ci/build.sh
> +++ b/ci/build.sh
> @@ -82,3 +82,15 @@ 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_meson_setup
> + run_build
run_meson_setup is redundant here too as implied by run_build
Rather than -j1 could we instead invoke 'run_build' twice eg:
BUILD_ARGS=libvirt-pot-dep run_build
BUILD_ARGS=libvirt-pot run_build
There was a reason why I did it that way, but I can't remember what it was.
Unless I manage to remember, I'll revert back to what you suggest.
Erik