diff --git a/.travis.yml b/.travis.yml index 773513fd..cfeef6e6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,7 @@ +os: + - linux + - osx + language: cpp compiler: @@ -20,6 +24,9 @@ before_install: - tar xf $LLVM_ARCHIVE_PATH -C $HOME/clang+llvm --strip-components 1 - export PATH=$HOME/clang+llvm/bin:$PATH - ln -s $HOME/clang+llvm/bin/clang++ $HOME/clang+llvm/bin/clang++-3.7 + - gem install md2man + - chmod +x install.sh + - ./install.sh addons: apt: @@ -40,8 +47,8 @@ script: - mkdir build && cd build && cmake .. - -DCMAKE_C_FLAGS="-Werror" - -DCMAKE_CXX_FLAGS="-Werror" + if [[ $TRAVIS_OS_NAME != 'osx' ]]; then -DCMAKE_C_FLAGS="-Werror" fi + if [[ $TRAVIS_OS_NAME != 'osx' ]]; then -DCMAKE_CXX_FLAGS="-Werror" fi && make VERBOSE=1 && (make test || true) diff --git a/install.sh b/install.sh new file mode 100644 index 00000000..b793555c --- /dev/null +++ b/install.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash + +if [[ $TRAVIS_OS_NAME == 'osx' ]]; then + + # Install some custom requirements on OS X + # e.g. brew install pyenv-virtualenv + + brew update; + brew install gnutls; + brew install libgcrypt; + brew install gcc5 --enable-cxx + brew install hiredis; + brew install bdw-gc; + brew install libev + brew install gettext + + #FIXME: temporary hack for mac as gettext is not detected otherwise + ln -s /usr/local/Cellar/gettext/*/lib/libintl.dylib /usr/local/lib/ + ln -s /usr/local/Cellar/gettext/*/include/libintl.h /usr/local/include + +fi \ No newline at end of file