language: cpp compiler: - clang - gcc cache: ccache os: - linux - osx services: - redis-server addons: apt: sources: - ubuntu-toolchain-r-test packages: - gcc-4.8 - g++-4.8 - clang before_install: - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install llvm --with-clang; fi install: - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install ccache; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export PATH="/usr/local/opt/ccache/libexec:$PATH"; fi - if [[ "$TRAVIS_OS_NAME" != "osx" && "$CXX" = "g++" ]]; then export CXX="g++-4.8" CC="gcc-4.8"; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install redis; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then (redis-server&); fi script: mkdir build && cd build && cmake .. -DBUILD_TESTS=true -DBUILD_EXAMPLES=true && make && GTEST_COLOR=1 ctest -VV