travis: use codecov instead of coveralls
This commit is contained in:
parent
843af6f4e9
commit
21491bbf6b
10
.travis.yml
10
.travis.yml
@ -13,9 +13,9 @@ _anchors:
|
||||
|
||||
matrix:
|
||||
include:
|
||||
# Linux GCC-4.6 debug coveralls
|
||||
# Linux GCC-4.6 debug tests_coverage
|
||||
- compiler: gcc
|
||||
env: TRAVIS_BUILD_TYPE=Debug TRAVIS_COVERALLS=ON
|
||||
env: TRAVIS_BUILD_TYPE=Debug TRAVIS_TESTS_COVERAGE=ON
|
||||
# Linux GCC-4.6 debug google_double-conversion
|
||||
- compiler: gcc
|
||||
env: TRAVIS_BUILD_TYPE=Debug TRAVIS_FLOAT2STR_LIB=google_doubleconversion
|
||||
@ -39,3 +39,9 @@ matrix:
|
||||
script:
|
||||
- chmod +x scripts/travis-build.sh
|
||||
- ./scripts/travis-build.sh
|
||||
|
||||
after_success:
|
||||
- |
|
||||
if [ "$TRAVIS_TESTS_COVERAGE" = "ON" ]; then
|
||||
bash <(curl -s https://codecov.io/bash);
|
||||
fi
|
||||
|
@ -3,24 +3,16 @@
|
||||
# Make the script fails on any command error
|
||||
set -e
|
||||
|
||||
# Install cpp-coveralls only if OS==linux and CC==gcc
|
||||
if [ "${TRAVIS_COVERALLS}" = "ON" ] \
|
||||
&& [ "${TRAVIS_OS_NAME}" = "linux" ] \
|
||||
&& [ "${CC}" = "gcc" ];
|
||||
then
|
||||
export PYTHONUSERBASE=`pwd`/pip;
|
||||
pip install --user cpp-coveralls;
|
||||
else
|
||||
export TRAVIS_COVERALLS=OFF;
|
||||
fi
|
||||
echo TRAVIS_COVERALLS=$TRAVIS_COVERALLS
|
||||
|
||||
# CMake options as environment variables
|
||||
if [ -n "${TRAVIS_GCC_VERSION}" ]; then
|
||||
export CC=gcc-$TRAVIS_GCC_VERSION;
|
||||
export CXX=g++-$TRAVIS_GCC_VERSION;
|
||||
fi
|
||||
|
||||
if [ -z "${TRAVIS_TESTS_COVERAGE}" ]; then
|
||||
export TRAVIS_TESTS_COVERAGE=OFF;
|
||||
fi
|
||||
|
||||
if [ -z "${TRAVIS_FLOAT2STR_LIB}" ]; then
|
||||
export TRAVIS_FLOAT2STR_LIB=std;
|
||||
fi
|
||||
@ -38,22 +30,10 @@ cmake .. -G "Unix Makefiles" \
|
||||
-DGMIO_BUILD_BENCHMARK_ASSIMP=OFF \
|
||||
-DGMIO_BUILD_BENCHMARK_OPENCASCADE=OFF \
|
||||
-DGMIO_BUILD_TESTS_FAKE_SUPPORT=ON \
|
||||
-DGMIO_BUILD_TESTS_COVERAGE=$TRAVIS_COVERALLS \
|
||||
-DGMIO_BUILD_TESTS_COVERAGE=$TRAVIS_TESTS_COVERAGE \
|
||||
-DGMIO_FLOAT2STR_LIB=$TRAVIS_FLOAT2STR_LIB
|
||||
|
||||
# Make
|
||||
make -j4 VERBOSE=1
|
||||
make install
|
||||
make check # Unit tests
|
||||
|
||||
# Coveralls
|
||||
if [ "${TRAVIS_COVERALLS}" = "ON" ]; then
|
||||
$PYTHONUSERBASE/bin/coveralls \
|
||||
--exclude benchmarks \
|
||||
--exclude build/CMakeFiles \
|
||||
--exclude examples \
|
||||
--exclude install \
|
||||
--exclude tests \
|
||||
--gcov-options '\-lp' \
|
||||
--root .. --build-root . ;
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user