diff --git a/.travis.yml b/.travis.yml index 3f81524..fec0442 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,16 +1,33 @@ language: cpp -os: - - linux - - osx - -compiler: - - gcc -env: - matrix: - - GCC_VER="4.9" - - GCC_VER="5" +addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - g++-4.9 + - g++-5 + +matrix: + include: + - os: linux + sudo: required + env: GCC_VER="4.9" + compiler: gcc + - os: linux + sudo: required + env: + - GCC_VER="5" + - CPPCHECK=1 + - COVERAGE=1 + - FUZZY_CMD="-D RUN_FUZZY_TESTS:BOOL=TRUE" + compiler: gcc + - os: osx + compiler: clang + + +env: global: - secure: eiaR6pXiiEpyB8+LLQ1NvZdl0Yylru1BLy9lMoHl+IpUNGGQGywmW/2WAn77rFfmR1OPA2qWQLfgPwgK0HxUA9HHlot9tre5QhiN2Lw8NOT8tCZ6tTm2+QntDBjBGJyal/knRvQkn/6qs6GxlXRerz4ArnnuPL1vESt3zwB0YtU= # The next declaration is the encrypted COVERITY_SCAN_TOKEN, created @@ -18,17 +35,12 @@ env: before_install: - export CXX="g++-$GCC_VER" CC="gcc-$GCC_VER" GCOV="gcov-$GCC_VER" - - if [ "$GCC_VER" = "5" ]; then export COVERAGE=1 CPPCHECK=1; fi - - if [ ${COVERAGE} = 1 ]; then export FUZZY_CMD="-D RUN_FUZZY_TESTS:BOOL=TRUE"; fi - - sudo pip install cpp-coveralls - - sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y - - sudo apt-get update - - sudo apt-get install -qq g++-$GCC_VER + - pip install --user cpp-coveralls script: - - if [ ${COVERITY_SCAN_BRANCH} != 1 ]; then cmake -D ENABLE_COVERAGE:BOOL=TRUE -D CMAKE_BUILD_TYPE:STRING=Debug $FUZZY_CMD . ; fi - - if [ ${COVERITY_SCAN_BRANCH} != 1 ]; then make -j2 ; fi - - make test + - cmake -D ENABLE_COVERAGE:BOOL=TRUE -D CMAKE_BUILD_TYPE:STRING=Debug $FUZZY_CMD . + - cmake --build . -- -j2 + - ctest - if [ ${COVERAGE} = 1 ]; then bash <(curl -s https://raw.githubusercontent.com/codecov/codecov-bash/master/codecov) -x $GCOV -a "-s `pwd`" ; fi after_script: