[libvirt] [PATCH v3 6/6] travis: put macOS script inline in the macOS matrix entry

Daniel P. Berrangé posted 6 patches 5 years, 8 months ago
There is a newer version of this series
[libvirt] [PATCH v3 6/6] travis: put macOS script inline in the macOS matrix entry
Posted by Daniel P. Berrangé 5 years, 8 months ago
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 .travis.yml | 16 ++++------------
 1 file changed, 4 insertions(+), 12 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 027fa0c67a..af17dc6276 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -48,23 +48,15 @@ matrix:
       os: osx
       env:
         - PATH="/usr/local/opt/gettext/bin:/usr/local/opt/ccache/libexec:/usr/local/opt/rpcgen/bin:$PATH"
+        - VIR_TEST_DEBUG=1
       script:
-        /bin/sh -xc "$MACOS_CMD"
+        # We can't run 'distcheck' or 'syntax-check' because they fail on
+        # macOS, but doing 'install' and 'dist' gives us some useful coverage
+        - ./autogen.sh --prefix=$(pwd)/install-root && make -j3 && make -j3 install && make -j3 dist
 
 git:
   submodules: true
 
-env:
-  global:
-    - VIR_TEST_DEBUG=1
-    # 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="
-        ./autogen.sh --prefix=\$(pwd)/install-root &&
-        make -j3 &&
-        make -j3 install &&
-        make -j3 dist"
-
 notifications:
   irc:
     # The channel name "irc.oftc.net#virt" is encrypted against libvirt/libvirt
-- 
2.20.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH v3 6/6] travis: put macOS script inline in the macOS matrix entry
Posted by Andrea Bolognani 5 years, 7 months ago
On Wed, 2019-03-27 at 17:10 +0000, Daniel P. Berrangé wrote:
[...]
> @@ -48,23 +48,15 @@ matrix:
>        os: osx
>        env:
>          - PATH="/usr/local/opt/gettext/bin:/usr/local/opt/ccache/libexec:/usr/local/opt/rpcgen/bin:$PATH"
> +        - VIR_TEST_DEBUG=1

Since we're not running 'make check' on macOS, setting
VIR_TEST_DEBUG in its environment is not particularly useful :)

On the other hand, this made me realize that our new Makefile.ci
does not set this environment variable itself, nor does it pass it
to the container if it's already present. I think we can just set
it unconditionally in Makefile.ci.

-- 
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 6/6] travis: put macOS script inline in the macOS matrix entry
Posted by Daniel P. Berrangé 5 years, 7 months ago
On Mon, Apr 01, 2019 at 10:15:51AM +0200, Andrea Bolognani wrote:
> On Wed, 2019-03-27 at 17:10 +0000, Daniel P. Berrangé wrote:
> [...]
> > @@ -48,23 +48,15 @@ matrix:
> >        os: osx
> >        env:
> >          - PATH="/usr/local/opt/gettext/bin:/usr/local/opt/ccache/libexec:/usr/local/opt/rpcgen/bin:$PATH"
> > +        - VIR_TEST_DEBUG=1
> 
> Since we're not running 'make check' on macOS, setting
> VIR_TEST_DEBUG in its environment is not particularly useful :)

Opps, should have been removed entirely in the patch that switches
to use Makefile.ci for linux/mingw builds

> On the other hand, this made me realize that our new Makefile.ci
> does not set this environment variable itself, nor does it pass it
> to the container if it's already present. I think we can just set
> it unconditionally in Makefile.ci.

Agreed. We can hardcode it safely even if not running the 'check' make
target.

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 6/6] travis: put macOS script inline in the macOS matrix entry
Posted by Andrea Bolognani 5 years, 7 months ago
On Wed, 2019-03-27 at 17:10 +0000, Daniel P. Berrangé wrote:
[...]
>        script:
> -        /bin/sh -xc "$MACOS_CMD"
> +        # We can't run 'distcheck' or 'syntax-check' because they fail on
> +        # macOS, but doing 'install' and 'dist' gives us some useful coverage
> +        - ./autogen.sh --prefix=$(pwd)/install-root && make -j3 && make -j3 install && make -j3 dist

One more thing: it would be nice if we could replace that '-j3' with
something similar to the 'getconf _NPROCESSORS_ONLN' call we have in
Makefile.ci for Linux builds.

Of course it would be a separate change that we can do as a follow
up, I'm just writing it down before I forget (again).

-- 
Andrea Bolognani / Red Hat / Virtualization

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