[libvirt] [PATCH v3 4/6] travis: use declarative syntax for homebrew packages

Daniel P. Berrangé posted 6 patches 5 years, 8 months ago
There is a newer version of this series
[libvirt] [PATCH v3 4/6] travis: use declarative syntax for homebrew packages
Posted by Daniel P. Berrangé 5 years, 8 months ago
Instead of running custom commands use the new declarative syntax for
listing extra homebrew packages.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 .travis.yml | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 6d04201e59..fe9bda82a9 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -5,6 +5,14 @@ branches:
   except:
     - /^.*-maint$/
 
+addons:
+  homebrew:
+    packages:
+      - ccache
+      - rpcgen
+      - xz
+      - yajl
+
 matrix:
   include:
     - services:
@@ -52,8 +60,6 @@ env:
     # We can't run 'distcheck' or 'syntax-check' because they fail on
     # macOS, but doing 'install' and 'dist' gives us some useful coverage
     - MACOS_CMD="
-        brew update &&
-        brew install ccache rpcgen xz yajl &&
         ./autogen.sh --prefix=\$(pwd)/install-root &&
         make -j3 &&
         make -j3 install &&
-- 
2.20.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH v3 4/6] travis: use declarative syntax for homebrew packages
Posted by Andrea Bolognani 5 years, 7 months ago
On Wed, 2019-03-27 at 17:10 +0000, Daniel P. Berrangé wrote:
> Instead of running custom commands use the new declarative syntax for
> listing extra homebrew packages.

s/homebrew/Homebrew/g in the commit message.

[...]
> +addons:
> +  homebrew:
> +    packages:
> +      - ccache
> +      - rpcgen
> +      - xz
> +      - yajl

According to the documentation[1], this is not equivalent to the
code you're replacing since it will not run 'brew update' before
installing packages. Updating the system before building sounds
like a good idea to me, but I could be convinced otherwise :)

Another thing I think is worth mentioning is that several times in
the past we had to work around Homebrew issues, which is easy to do
when you're calling it from the shell but not so when you use the
declarative syntax. Switching back and forth is simple enough,
though, so we can just do that if the need ever arises again.


[1] https://docs.travis-ci.com/user/installing-dependencies/#installing-packages-on-macos

-- 
Andrea Bolognani / Red Hat / Virtualization

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH v3 4/6] travis: use declarative syntax for homebrew packages
Posted by Daniel P. Berrangé 5 years, 7 months ago
On Mon, Apr 01, 2019 at 10:08:45AM +0200, Andrea Bolognani wrote:
> On Wed, 2019-03-27 at 17:10 +0000, Daniel P. Berrangé wrote:
> > Instead of running custom commands use the new declarative syntax for
> > listing extra homebrew packages.
> 
> s/homebrew/Homebrew/g in the commit message.
> 
> [...]
> > +addons:
> > +  homebrew:
> > +    packages:
> > +      - ccache
> > +      - rpcgen
> > +      - xz
> > +      - yajl
> 
> According to the documentation[1], this is not equivalent to the
> code you're replacing since it will not run 'brew update' before
> installing packages. Updating the system before building sounds
> like a good idea to me, but I could be convinced otherwise :)

I forgot this can be done by adding

    update: true


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 :|

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH v3 4/6] travis: use declarative syntax for homebrew packages
Posted by Andrea Bolognani 5 years, 7 months ago
On Mon, 2019-04-01 at 12:04 +0100, Daniel P. Berrangé wrote:
> On Mon, Apr 01, 2019 at 10:08:45AM +0200, Andrea Bolognani wrote:
> > On Wed, 2019-03-27 at 17:10 +0000, Daniel P. Berrangé wrote:
> > > +addons:
> > > +  homebrew:
> > > +    packages:
> > > +      - ccache
> > > +      - rpcgen
> > > +      - xz
> > > +      - yajl
> > 
> > According to the documentation[1], this is not equivalent to the
> > code you're replacing since it will not run 'brew update' before
> > installing packages. Updating the system before building sounds
> > like a good idea to me, but I could be convinced otherwise :)
> 
> I forgot this can be done by adding
> 
>     update: true

Yeah, I saw that in the documentation. So do you think we should
include that additional setting and keep updating the system before
builds, as we have done until now?

-- 
Andrea Bolognani / Red Hat / Virtualization

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list