Fix coveralls crashing when building with clang

Coveralls defaulted to using gcov for all builds even when using clang
in which case it should have used llvm-cov. Fix this by specifying
different coveralls commands for each compiler.

Additionally, move the coverage to commands to the after_success section
to avoid sending coverage data when the build failed.
This commit is contained in:
Nikos Tsipinakis 2018-03-09 18:12:08 +02:00
parent aa5ccd7dd7
commit 533f47f4c6

View File

@ -18,14 +18,22 @@ addons:
dist: trusty dist: trusty
sudo: false sudo: false
language: c language: c
before_install: before_install:
- pip install --user cpp-coveralls - pip install --user cpp-coveralls
script: script:
- CFLAGS="-fprofile-arcs -ftest-coverage -Werror" make all dunstify test-valgrind doc-doxygen - CFLAGS="-fprofile-arcs -ftest-coverage -Werror" make all dunstify test-valgrind doc-doxygen
- coveralls
compiler: matrix:
- gcc include:
- clang - compiler: gcc
after_success:
- coveralls
- compiler: clang
after_success:
- coveralls --gcov llvm-cov --gcov-options gcov
notifications: notifications:
irc: irc:
channels: channels: