[libvirt PATCH 2/2] ci: Call meson consistently

Martin Kletzander mkletzan at redhat.com
Thu Apr 8 10:32:10 UTC 2021


On Thu, Apr 01, 2021 at 03:43:11PM +0200, Andrea Bolognani wrote:
>On Wed, 2021-03-31 at 23:31 +0200, Martin Kletzander wrote:
>> On Fri, Mar 26, 2021 at 11:35:02AM +0100, Andrea Bolognani wrote:
>> > We should always pass --werror and display the contents of the
>> > log file in case of failure.
>>
>> Any reason why the lines are not in one place?  What I did in libnbd
>> (first draft, still up for review) is that I just took all the lines of
>> the script and put them inside `ci/build_script.sh` with only the most
>> basic conditionals to accommodate various types of runs.  That way
>> common things are in one place.  It could take a parameter (like what
>> ninja target to run) and you can run things after that (like `website`
>> and `potfiles` jobs do.  Just an idea.
>
>As is often the case, the raisins are mostly hysterical ;)
>
>I think the initial idea was to keep things as simple as possible,
>but I agree with you that when you have seven (!) build recipes, most
>of which are almost identical, it makes sense to think about
>consolidating them to a single location.
>

So I took a look at the consolidation.  I went through few iterations
after which I ended with two scripts, one that does the meson part and
one that does the ninja part.  The first one does not need to take any
parameters, the other one would be nice if it took one, that's enough.
What's weird about it is the way I think of it.  The most understandable
way would be a `configure` that runs `meson ...` and then another one,
which runs `ninja ...` with parameter(s).

At that point you can make the second one a Makefile and just do:

   ./configure
   make

most of the time.  But because we can just put the configure part into
the makefile we can also just have a makefile that does all of it.  It
might sound stupid, but it is the easiest way how to provide few targets
without extra scripting and everything around it.  On the other hand it
feels weird just suggesting that, although I cannot pinpoint why that
is.  Maybe that it would be too controversial?

At this point I honestly do not know whether I went too far or it
actually makes sense and I am not capable of recognising the difference.

Thoughts?

>--
>Andrea Bolognani / Red Hat / Virtualization
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20210408/fe066350/attachment-0001.sig>


More information about the libvir-list mailing list