language: cpp os: - linux - osx matrix: exclude: - compiler: clang env: COVERAGE=1 - os: gcc env: COVERAGE=0 env: global: # The next declaration is the encrypted COVERITY_SCAN_TOKEN, created # via the "travis encrypt" command using the project repo's public key - secure: "A4JeyJ/faUkHRFCwKD/l7I6/zY4Jzs9SFxrRxxcvqFCawisCZDK3myw1ZMSEFp6bNBC1onWrEbBp7wgQ3aW5bf+xVtNaHvxvGvwOQMY8enFsTfgZ8YA4WTBwqeaFa6tUOC4/u7cQwTK2vlNZxpbATIOJhseOSi0ExD+8igyi4WU=" - secure: "lbql5U+YxidgVE9xyyL78hhkYMI1TfVfl1JYsV8zLwhiEF7hvi2cKYzJEuQjzc4nlAzKXP2iBrCzy5aE4mh/0P7wnHMGuD4l/ixdAlz+QQedK0siw3G9lt8j7Fsn/IucRhFu0k8kwltQsHtq2+E5eCsAqJkwxNPX0xshuV2x6Mk=" matrix: - COVERAGE=0 - COVERAGE=1 addons: coverity_scan: project: name: "paulsapps/SUDM" description: "Build submitted via Travis CI" notification_email: coverityscan@paulsapps.com build_command_prepend: "cmake .." build_command: "make -j4" branch_pattern: coverity_scan compiler: - clang - gcc before_install: - sudo add-apt-repository ppa:boost-latest/ppa -y - sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y - if [ "$CXX" == "clang++" ]; then sudo add-apt-repository ppa:h-rayflood/llvm -y; fi - sudo apt-get update - sudo apt-get install --allow-unauthenticated boost1.55 - if [ "$CXX" == "g++" ]; then sudo apt-get install --allow-unauthenticated gcc-4.9; fi - if [ "$CXX" == "g++" ]; then sudo apt-get install --allow-unauthenticated g++-4.9; fi - if [ "$CXX" == "g++" ]; then sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 90; fi - if [ "$CXX" == "g++" ]; then sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.9 90; fi - if [ "$CXX" == "g++" ]; then sudo update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-4.9 90; fi - if [ "$CXX" == "g++" ]; then sudo update-alternatives --config gcc; fi - if [ "$CXX" == "g++" ]; then sudo update-alternatives --config g++; fi - if [ "$CXX" == "clang++" ]; then sudo apt-get install --allow-unauthenticated -qq clang-3.4; fi - if [ "$CXX" == "clang++" ]; then export CXX="clang++-3.4"; fi - if [ "$CXX" == "clang++" ]; then export CXX="clang++-3.4"; fi - if [ "$CXX" == "g++" ]; then sudo apt-get install ruby1.9.1 ruby1.9.1-dev; fi - if [ "$CXX" == "g++" ]; then sudo apt-get install rubygems1.9.1 irb1.9.1 ri1.9.1; fi - if [ "$CXX" == "g++" ]; then rvmsudo gem install coveralls-lcov; fi - if [ "$CXX" == "g++" ]; then sudo apt-get install lcov; fi - if [ "$CXX" == "g++" ]; then wget http://ftp.de.debian.org/debian/pool/main/l/lcov/lcov_1.11.orig.tar.gz; fi - if [ "$CXX" == "g++" ]; then tar xf lcov_1.11.orig.tar.gz; fi - if [ "$CXX" == "g++" ]; then sudo make -C lcov-1.11/ install; fi - if [ "$CXX" == "g++" ]; then lcov --version; fi - if [ "$CXX" == "g++" ]; then gcov --version; fi before_script: - $CXX --version - mkdir build - cd build after_success: - if [[ "$CXX" == "g++" && "${COVERAGE}" == 1 ]]; then lcov --directory . --capture --output-file coverage.info; fi - if [[ "$CXX" == "g++" && "${COVERAGE}" == 1 ]]; then lcov --remove coverage.info '*/googlemock/*' '/usr/*' --output-file coverage.info; fi - if [[ "$CXX" == "g++" && "${COVERAGE}" == 1 ]]; then lcov --list coverage.info; fi - if [[ "$CXX" == "g++" && "${COVERAGE}" == 1 ]]; then coveralls-lcov coverage.info; fi script: - cmake .. - if [ "${COVERITY_SCAN_BRANCH}" != 1 ]; then make -j2; fi - if [ "${COVERITY_SCAN_BRANCH}" != 1 ]; then ctest --output-on-failure; fi