diff --git a/.travis.yml b/.travis.yml index 042c0faea..c083bd763 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,6 @@ +os: + - linux + - osx language: cpp dist: trusty sudo: required @@ -26,17 +29,7 @@ matrix: env: COMPILER=g++-5 before_install: - - sudo apt-get update -qq - - if [ "$COMPILER" = "g++-4.9" ]; then sudo apt-get install -qq g++-4.9; fi - - if [ "$COMPILER" = "g++-4.9" ]; then export CXX="g++-4.9" CC="gcc-4.9"; fi - - if [ "$COMPILER" = "g++-5" ]; then sudo apt-get install -qq g++-5; fi - - if [ "$COMPILER" = "g++-5" ]; then export CXX="g++-5" CC="gcc-5"; fi - - sudo apt-get install -y libboost-all-dev - - sudo apt-get install -y gperf - - sudo apt-get install -y libevent-dev - - sudo apt-get install -y uuid-dev - - sudo apt-get install -y python-sphinx - - sudo apt-get install -y libhiredis-dev + - . scripts/travis-$TRAVIS_OS_NAME.sh script: - ./bootstrap.sh -a diff --git a/scripts/travis-linux.sh b/scripts/travis-linux.sh new file mode 100644 index 000000000..947488f1d --- /dev/null +++ b/scripts/travis-linux.sh @@ -0,0 +1,7 @@ +sudo apt-get update -qq +COMPILER_PACKAGE="" +if [ "$COMPILER" = "g++-4.9" ]; then COMPILER_PACKAGE=g++-4.9 +elif [ "$COMPILER" = "g++-5" ]; then COMPILER_PACKAGE=g++-5; fi +sudo apt-get install -y libboost-all-dev gperf libevent-dev uuid-dev python-sphinx libhiredis-dev $COMPILER_PACKAGE +if [ "$COMPILER" = "g++-4.9" ]; then export CXX="g++-4.9" CC="gcc-4.9" +elif [ "$COMPILER" = "g++-5" ]; then export CXX="g++-5" CC="gcc-5"; fi diff --git a/scripts/travis-osx.sh b/scripts/travis-osx.sh new file mode 100644 index 000000000..d8e4c7d97 --- /dev/null +++ b/scripts/travis-osx.sh @@ -0,0 +1,7 @@ +#brew install boost +wget https://bootstrap.pypa.io/get-pip.py +sudo -H python get-pip.py +sudo -H pip install virtualenv +virtualenv sphinx +. sphinx/bin/activate +pip install sphinx