]> granicus.if.org Git - libevent/commitdiff
travis-ci/osx: install gcc and fix CC
authorAzat Khuzhin <azat@libevent.org>
Mon, 28 Jan 2019 17:30:57 +0000 (20:30 +0300)
committerAzat Khuzhin <azat@libevent.org>
Mon, 28 Jan 2019 18:22:25 +0000 (21:22 +0300)
Since there is no gcc in osx_image [1]:
    ls: /usr/local/bin/gcc-?.?: No such file or directory

  [1]: https://travis-ci.org/libevent/libevent/jobs/484794192#L95

And use ls(1) over echo(1) to show an error if there is no such file.

.travis.yml

index a25b78ffe05bea60b94975cb36421870bde842ed..946de8a1ef0879424e0f2c6923406b06e411e497 100644 (file)
@@ -50,7 +50,7 @@ before_install:
   - export TIMEOUT=50
   - if [ "$TRAVIS_OS_NAME" == "osx" ]; then
       if [ "$CC" == "gcc" ]; then
-        export CC=$(ls -t /usr/local/bin/gcc-?.?);
+        export CC=$(ls /usr/local/Cellar/gcc/*/bin/gcc-?);
       fi
 
       export OPENSSL_ROOT=$(echo /usr/local/Cellar/openssl/*);
@@ -82,6 +82,7 @@ addons:
     - openssl
     - lcov
     - libtool
+    - gcc
 
 
 script: