Tweak travis build matrix, enable coverage

This commit is contained in:
Dmitry Marakasov 2016-01-18 21:48:06 +03:00
parent 86cdcdf588
commit 2781786384

View File

@ -1,19 +1,27 @@
language: cpp language: cpp
sudo: required sudo: required
dist: trusty dist: trusty
compiler: matrix:
- gcc include:
- clang - compiler: gcc
env: env: CMAKE_FLAGS="-DSDL2PP_CXXSTDCXXSTD=c++11"
- CXXSTD=c++11 - compiler: gcc
- CXXSTD=c++1y env: CMAKE_FLAGS="-DSDL2PP_CXXSTDCXXSTD=c++1y"
- compiler: gcc
env: CMAKE_FLAGS="-DSDL2PP_CXXSTDCXXSTD=c++11 -DCMAKE_CXX_FLAGS=--coverage -DCMAKE_EXE_LINKER_FLAGS=--coverage -DCMAKE_SHARED_LINKER_FLAGS=--coverage -DCMAKE_BUILD_TYPE=Debug" COVERAGE=yes
- compiler: clang
env: CMAKE_FLAGS="-DSDL2PP_CXXSTDCXXSTD=c++11"
- compiler: clang
env: CMAKE_FLAGS="-DSDL2PP_CXXSTDCXXSTD=c++1y"
before_install: before_install:
- sudo apt-get update -qq - sudo apt-get update -qq
- sudo apt-get install -qq cmake libsdl2-dev libsdl2-image-dev libsdl2-ttf-dev libsdl2-mixer-dev cppcheck doxygen - sudo apt-get install -qq cmake libsdl2-dev libsdl2-image-dev libsdl2-ttf-dev libsdl2-mixer-dev cppcheck doxygen
- sudo sed -i -e '/using ::gets/ d' /usr/include/c++/4.8/cstdio # build failure with clang/c++1y - sudo sed -i -e '/using ::gets/ d' /usr/include/c++/4.8/cstdio # build failure with clang/c++1y
- if [ -n "$COVERAGE" ]; then pip install --user pyyaml; pip install --user cpp-coveralls; fi
script: script:
- cmake . -DSDL2PP_ENABLE_LIVE_TESTS=OFF -DCMAKE_INSTALL_PREFIX=`pwd`.prefix -DSDL2PP_WITH_WERROR=YES -DSDL2PP_CXXSTD=$CXXSTD - cmake . -DSDL2PP_ENABLE_LIVE_TESTS=OFF -DCMAKE_INSTALL_PREFIX=`pwd`.prefix -DSDL2PP_WITH_WERROR=YES $CMAKE_FLAGS
- VERBOSE=1 make && make test && make install - VERBOSE=1 make && make test && make install
- if [ -n "$COVERAGE" ]; then coveralls -i SDL2pp; fi
- cppcheck -I . --enable=performance,portability,information,missingInclude --error-exitcode=2 SDL2pp # `style' gives false positive in cppcheck 1.61 which comes with trusty - cppcheck -I . --enable=performance,portability,information,missingInclude --error-exitcode=2 SDL2pp # `style' gives false positive in cppcheck 1.61 which comes with trusty
- "if make doxygen 2>&1 | grep 'warning:'; then echo 'FATAL: doxygen warnings!'; false; fi" - "if make doxygen 2>&1 | grep 'warning:'; then echo 'FATAL: doxygen warnings!'; false; fi"
- "if git ls-files --others --exclude-standard | grep ''; then echo 'FATAL: incomplete .gitignore'; false; fi" - "if git ls-files --others --exclude-standard | grep ''; then echo 'FATAL: incomplete .gitignore'; false; fi"