.travis.yml 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. language: cpp
  2. os:
  3. - linux
  4. - osx
  5. matrix:
  6. exclude:
  7. - compiler: clang
  8. env: COVERAGE=1
  9. - os: gcc
  10. env: COVERAGE=0
  11. env:
  12. global:
  13. # The next declaration is the encrypted COVERITY_SCAN_TOKEN, created
  14. # via the "travis encrypt" command using the project repo's public key
  15. - secure: "A4JeyJ/faUkHRFCwKD/l7I6/zY4Jzs9SFxrRxxcvqFCawisCZDK3myw1ZMSEFp6bNBC1onWrEbBp7wgQ3aW5bf+xVtNaHvxvGvwOQMY8enFsTfgZ8YA4WTBwqeaFa6tUOC4/u7cQwTK2vlNZxpbATIOJhseOSi0ExD+8igyi4WU="
  16. - secure: "lbql5U+YxidgVE9xyyL78hhkYMI1TfVfl1JYsV8zLwhiEF7hvi2cKYzJEuQjzc4nlAzKXP2iBrCzy5aE4mh/0P7wnHMGuD4l/ixdAlz+QQedK0siw3G9lt8j7Fsn/IucRhFu0k8kwltQsHtq2+E5eCsAqJkwxNPX0xshuV2x6Mk="
  17. matrix:
  18. - COVERAGE=0
  19. - COVERAGE=1
  20. addons:
  21. coverity_scan:
  22. project:
  23. name: "paulsapps/SUDM"
  24. description: "Build submitted via Travis CI"
  25. notification_email: coverityscan@paulsapps.com
  26. build_command_prepend: "cmake .."
  27. build_command: "make -j4"
  28. branch_pattern: coverity_scan
  29. compiler:
  30. - clang
  31. - gcc
  32. before_install:
  33. - sudo add-apt-repository ppa:boost-latest/ppa -y
  34. - sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
  35. - if [ "$CXX" == "clang++" ]; then sudo add-apt-repository ppa:h-rayflood/llvm -y; fi
  36. - sudo apt-get update
  37. - sudo apt-get install --allow-unauthenticated boost1.55
  38. - if [ "$CXX" == "g++" ]; then sudo apt-get install --allow-unauthenticated gcc-4.9; fi
  39. - if [ "$CXX" == "g++" ]; then sudo apt-get install --allow-unauthenticated g++-4.9; fi
  40. - if [ "$CXX" == "g++" ]; then sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 90; fi
  41. - if [ "$CXX" == "g++" ]; then sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.9 90; fi
  42. - if [ "$CXX" == "g++" ]; then sudo update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-4.9 90; fi
  43. - if [ "$CXX" == "g++" ]; then sudo update-alternatives --config gcc; fi
  44. - if [ "$CXX" == "g++" ]; then sudo update-alternatives --config g++; fi
  45. - if [ "$CXX" == "clang++" ]; then sudo apt-get install --allow-unauthenticated -qq clang-3.4; fi
  46. - if [ "$CXX" == "clang++" ]; then export CXX="clang++-3.4"; fi
  47. - if [ "$CXX" == "clang++" ]; then export CXX="clang++-3.4"; fi
  48. - if [ "$CXX" == "g++" ]; then sudo apt-get install ruby1.9.1 ruby1.9.1-dev; fi
  49. - if [ "$CXX" == "g++" ]; then sudo apt-get install rubygems1.9.1 irb1.9.1 ri1.9.1; fi
  50. - if [ "$CXX" == "g++" ]; then rvmsudo gem install coveralls-lcov; fi
  51. - if [ "$CXX" == "g++" ]; then sudo apt-get install lcov; fi
  52. - if [ "$CXX" == "g++" ]; then wget http://ftp.de.debian.org/debian/pool/main/l/lcov/lcov_1.11.orig.tar.gz; fi
  53. - if [ "$CXX" == "g++" ]; then tar xf lcov_1.11.orig.tar.gz; fi
  54. - if [ "$CXX" == "g++" ]; then sudo make -C lcov-1.11/ install; fi
  55. - if [ "$CXX" == "g++" ]; then lcov --version; fi
  56. - if [ "$CXX" == "g++" ]; then gcov --version; fi
  57. before_script:
  58. - $CXX --version
  59. - mkdir build
  60. - cd build
  61. after_success:
  62. - if [[ "$CXX" == "g++" && "${COVERAGE}" == 1 ]]; then lcov --directory . --capture --output-file coverage.info; fi
  63. - if [[ "$CXX" == "g++" && "${COVERAGE}" == 1 ]]; then lcov --remove coverage.info '*/googlemock/*' '/usr/*' --output-file coverage.info; fi
  64. - if [[ "$CXX" == "g++" && "${COVERAGE}" == 1 ]]; then lcov --list coverage.info; fi
  65. - if [[ "$CXX" == "g++" && "${COVERAGE}" == 1 ]]; then coveralls-lcov coverage.info; fi
  66. script:
  67. - cmake ..
  68. - if [ "${COVERITY_SCAN_BRANCH}" != 1 ]; then make -j2; fi
  69. - if [ "${COVERITY_SCAN_BRANCH}" != 1 ]; then ctest --output-on-failure; fi