Skip to content

Commit

Permalink
Merge pull request #2100 from ngie-eign/test-clang-osx-every-travis-run
Browse files Browse the repository at this point in the history
Test out changes with clang/OSX each PR using Travis CI
  • Loading branch information
gennadiycivil committed Feb 5, 2019
2 parents e28b506 + 9df5475 commit 9a502a5
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
9 changes: 8 additions & 1 deletion .travis.yml
Expand Up @@ -48,8 +48,8 @@ matrix:
compiler: gcc
env: BUILD_TYPE=Release VERBOSE=1 CXX_FLAGS=-std=c++11 HOMEBREW_LOGS=~/homebrew-logs HOMEBREW_TEMP=~/homebrew-temp
- os: osx
compiler: clang
env: BUILD_TYPE=Release VERBOSE=1 CXX_FLAGS=-std=c++11 HOMEBREW_LOGS=~/homebrew-logs HOMEBREW_TEMP=~/homebrew-temp
if: type != pull_request

# These are the install and build (script) phases for the most common entries in the matrix. They could be included
# in each entry in the matrix, but that is just repetitive.
Expand All @@ -73,6 +73,13 @@ addons:
packages:
- g++-4.9
- clang-3.9
update: true
homebrew:
packages:
- ccache
- gcc@4.9
- llvm@3.9
update: true

notifications:
email: false
8 changes: 7 additions & 1 deletion ci/env-osx.sh
Expand Up @@ -37,5 +37,11 @@
#

if [ "${TRAVIS_OS_NAME}" = "osx" ]; then
if [ "$CXX" = "clang++" ]; then export CXX="clang++-3.9" CC="clang-3.9"; fi
if [ "$CXX" = "clang++" ]; then
# $PATH needs to be adjusted because the llvm tap doesn't install the
# package to /usr/local/bin, etc, like the gcc tap does.
# See: https://github.com/Homebrew/legacy-homebrew/issues/29733
clang_version=3.9
export PATH="/usr/local/opt/llvm@${clang_version}/bin:$PATH";
fi
fi
3 changes: 2 additions & 1 deletion ci/install-osx.sh
Expand Up @@ -36,4 +36,5 @@ if [ "${TRAVIS_OS_NAME}" != "osx" ]; then
exit 0
fi

brew install ccache
brew update
brew install ccache gcc@4.9 llvm@3.9

0 comments on commit 9a502a5

Please sign in to comment.