From: Ivan Maidanski Date: Tue, 31 Jan 2017 19:13:44 +0000 (+0300) Subject: Travis CI: Report test coverage for Linux/x64 (native CPU) X-Git-Tag: v7.6.0~104 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=88ee70dc5962933e7cd91bdeef09180dfa61c7c2;p=libatomic_ops Travis CI: Report test coverage for Linux/x64 (native CPU) --- diff --git a/.travis.yml b/.travis.yml index d078c9b..30fbb70 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,21 +12,33 @@ env: - CFLAGS_EXTRA= - CFLAGS_EXTRA=-march=native - CFLAGS_EXTRA="-m32 -march=native" + - CFLAGS_EXTRA="--coverage -march=native" matrix: exclude: - os: osx compiler: gcc + - compiler: clang + env: CFLAGS_EXTRA="--coverage -march=native" + - os: linux + compiler: gcc + env: CFLAGS_EXTRA=-march=native sudo: required before_install: - if [[ "$TRAVIS_OS_NAME" == "linux" && "$CFLAGS_EXTRA" == -m32* ]]; then sudo apt-get install libc6:i386 libc6-dev-i386; fi + - if [[ "$CFLAGS_EXTRA" == --coverage* ]]; then sudo apt-get install lcov; gem install coveralls-lcov; ENABLE_GCOV=--enable-gcov; CFLAGS_EXTRA="-march=native"; fi install: - ./autogen.sh - - ./configure --enable-assertions --enable-werror + - ./configure --enable-assertions $ENABLE_GCOV --enable-werror script: - make -j check CFLAGS_EXTRA="$CFLAGS_EXTRA" - cat tests/test_atomic*.log + +after_success: + - if [[ "$ENABLE_GCOV" == "--enable-gcov" ]]; then lcov --directory src --capture --output-file coverage.info; fi + - if [[ "$ENABLE_GCOV" == "--enable-gcov" ]]; then lcov --remove coverage.info 'tests/*' --output-file coverage.info && lcov --list coverage.info; fi + - if [[ "$ENABLE_GCOV" == "--enable-gcov" ]]; then coveralls-lcov --repo-token ${COVERALLS_TOKEN} coverage.info; fi