.travis.yml 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. matrix:
  2. include:
  3. - os: linux
  4. env: BUILD_TYPE=Debug STD=c++0x
  5. - os: linux
  6. env: BUILD_TYPE=Debug STD=c++11
  7. - os: linux
  8. env: BUILD_TYPE=Release STD=c++0x
  9. - os: linux
  10. env: BUILD_TYPE=Release STD=c++11
  11. - os: osx
  12. env: BUILD_TYPE=Debug STD=c++11
  13. - os: osx
  14. env: BUILD_TYPE=Release STD=c++11
  15. language:
  16. - cpp
  17. before_install:
  18. - if [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$STD" = "c++11" ]; then sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test; fi
  19. - if [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$STD" = "c++11" ]; then sudo apt-get update -qq; fi
  20. install:
  21. - if [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$STD" = "c++11" ]; then sudo apt-get install -qq gcc-4.8 g++-4.8; fi
  22. - if [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$STD" = "c++11" ]; then sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 90; fi
  23. before_script:
  24. - mkdir build && cd build
  25. script:
  26. - cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DCMAKE_CXX_FLAGS="-std=${STD}"
  27. - make
  28. - make CTEST_OUTPUT_ON_FAILURE=1 test