summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcostan <costan@google.com>2018-01-04 14:26:40 -0800
committerVictor Costan <pwnall@chromium.org>2018-01-04 15:27:36 -0800
commite69d9f880677f2aa3488c80b953ec4309f0dfa2e (patch)
tree5712b24d3979d6869c8d1fb0a99ce2a4caaa1762
parent4aba5426d47af960939d85d6f74c0a6ac7124887 (diff)
downloadsnappy-e69d9f880677f2aa3488c80b953ec4309f0dfa2e.tar.gz
snappy-e69d9f880677f2aa3488c80b953ec4309f0dfa2e.tar.bz2
snappy-e69d9f880677f2aa3488c80b953ec4309f0dfa2e.zip
Fix Travis CI configuration for OSX.
-rw-r--r--.travis.yml15
1 files changed, 11 insertions, 4 deletions
diff --git a/.travis.yml b/.travis.yml
index 9841e9a..8816edb 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -38,10 +38,17 @@ addons:
- clang-4.0
install:
-# Travis doesn't have a nice way to install homebrew packages yet.
-# https://github.com/travis-ci/travis-ci/issues/5377
-- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew update; fi
-- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew install gcc@6; fi
+# Travis doesn't have a DSL for installing homebrew packages yet. Status tracked
+# in https://github.com/travis-ci/travis-ci/issues/5377
+# The Travis VM image for Mac already has a link at /usr/local/include/c++,
+# causing Homebrew's gcc@6 installation to error out. This was reported to
+# Homebrew maintainers at https://github.com/Homebrew/brew/issues/1742 and
+# removing the link emerged as a workaround.
+- if [ "$TRAVIS_OS_NAME" == "osx" ]; then
+ brew update;
+ if [ -L /usr/local/include/c++ ]; then rm /usr/local/include/c++; fi;
+ brew install gcc@6;
+ fi
# /usr/bin/gcc is stuck to old versions by on both Linux and OSX.
- if [ "$CXX" = "g++" ]; then export CXX="g++-6" CC="gcc-6"; fi
- echo ${CC}