diff options
| author | Garrett D'Amore <garrett@damore.org> | 2017-08-07 13:54:49 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2017-08-07 13:56:59 -0700 |
| commit | 124114c0a8add705d4c3affb6f602b0a36eb4237 (patch) | |
| tree | f820133b5e4a38579a026ed4f5ebe00ccf7b0493 /.travis.yml | |
| parent | b02a4341a9214cc57587c300171824d79b346913 (diff) | |
| download | nng-124114c0a8add705d4c3affb6f602b0a36eb4237.tar.gz nng-124114c0a8add705d4c3affb6f602b0a36eb4237.tar.bz2 nng-124114c0a8add705d4c3affb6f602b0a36eb4237.zip | |
Richer CI support on Travis, including code coverage.
We use codecov.io; this seems to work well.
Diffstat (limited to '.travis.yml')
| -rw-r--r-- | .travis.yml | 74 |
1 files changed, 65 insertions, 9 deletions
diff --git a/.travis.yml b/.travis.yml index 3c0e53a0..6d15f2b8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,22 +1,74 @@ -language: c +language: generic dist: trusty sudo: false addons: apt: + sources: + - ubuntu-toolchain-r-test + - llvm-toolchain-trusty-4.0 packages: - cmake - - uncrustify - colordiff + - g++-4.9 + - g++-7 + - clang-4.0 + - clang-format-4.0 matrix: include: + # default gcc 4.9 build - we also do a clang-format check here. - os: linux - compiler: gcc + env: >- + CC=gcc-4.9 + CXX=g++-4.9 + COVERAGE=OFF + BUILD_TYPE=Debug + TEST_PARALLEL=-j4 + CLANG_FORMAT=clang-format-4.0 - os: linux - compiler: clang -# - os: osx -# compiler: gcc + env: >- + CC=gcc-7 + CXX=g++-7 + COVERAGE=OFF + BUILD_TYPE=Debug + TEST_PARALLEL=-j4 + CLANG_FORMAT=no + # clang v4 build + - os: linux + env: >- + CC=clang-4.0 + CXX=clang++-4.0 + COVERAGE=OFF + BUILD_TYPE=Debug + TEST_PARALLEL=-j4 + CLANG_FORMAT=no + # one release build + - os: linux + env: >- + CC=clang-4.0 + CXX=clang++-4.0 + COVERAGE=OFF + BUILD_TYPE=Release + TEST_PARALLEL=-j4 + CLANG_FORMAT=no + # code coverage build + - os: linux + env: >- + CC=clang-4.0 + CXX=clang++-4.0 + COVERAGE=ON + BUILD_TYPE=Debug + TEST_PARALLEL= + CLANG_FORMAT=no + # One MacOS X build - os: osx - compiler: clang + env: >- + CC=clang + CXX=clang++ + COVERAGE=OFF + TEST_PARALLEL=-j4 + BUILD_TYPE=Debug + CLANG_FORMAT=no + script: # Print all environment variables to aid in CI development - uname -a @@ -27,7 +79,11 @@ script: - mkdir build - cd build # Perform CMake backend generation, build, and test - - cmake -DCMAKE_BUILD_TYPE=Debug .. + - cmake -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DNNG_ENABLE_COVERAGE=${COVERAGE} .. - cmake --build . -- -j4 - - ctest --output-on-failure -C Debug -j4 + - ctest --output-on-failure -C ${BUILD_TYPE} ${TEST_PARALLEL} - ../etc/format-check.sh + + after_success: + - ../etc/codecov.sh + |
