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:
|
matrix:
|
||||||
include:
|
include:
|
||||||
# Linux GCC-4.6 debug coveralls
|
# Linux GCC-4.6 debug tests_coverage
|
||||||
- compiler: gcc
|
- 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
|
# Linux GCC-4.6 debug google_double-conversion
|
||||||
- compiler: gcc
|
- compiler: gcc
|
||||||
env: TRAVIS_BUILD_TYPE=Debug TRAVIS_FLOAT2STR_LIB=google_doubleconversion
|
env: TRAVIS_BUILD_TYPE=Debug TRAVIS_FLOAT2STR_LIB=google_doubleconversion
|
||||||
@ -39,3 +39,9 @@ matrix:
|
|||||||
script:
|
script:
|
||||||
- chmod +x scripts/travis-build.sh
|
- chmod +x scripts/travis-build.sh
|
||||||
- ./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
|
# Make the script fails on any command error
|
||||||
set -e
|
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
|
# CMake options as environment variables
|
||||||
if [ -n "${TRAVIS_GCC_VERSION}" ]; then
|
if [ -n "${TRAVIS_GCC_VERSION}" ]; then
|
||||||
export CC=gcc-$TRAVIS_GCC_VERSION;
|
export CC=gcc-$TRAVIS_GCC_VERSION;
|
||||||
export CXX=g++-$TRAVIS_GCC_VERSION;
|
export CXX=g++-$TRAVIS_GCC_VERSION;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -z "${TRAVIS_TESTS_COVERAGE}" ]; then
|
||||||
|
export TRAVIS_TESTS_COVERAGE=OFF;
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -z "${TRAVIS_FLOAT2STR_LIB}" ]; then
|
if [ -z "${TRAVIS_FLOAT2STR_LIB}" ]; then
|
||||||
export TRAVIS_FLOAT2STR_LIB=std;
|
export TRAVIS_FLOAT2STR_LIB=std;
|
||||||
fi
|
fi
|
||||||
@ -38,22 +30,10 @@ cmake .. -G "Unix Makefiles" \
|
|||||||
-DGMIO_BUILD_BENCHMARK_ASSIMP=OFF \
|
-DGMIO_BUILD_BENCHMARK_ASSIMP=OFF \
|
||||||
-DGMIO_BUILD_BENCHMARK_OPENCASCADE=OFF \
|
-DGMIO_BUILD_BENCHMARK_OPENCASCADE=OFF \
|
||||||
-DGMIO_BUILD_TESTS_FAKE_SUPPORT=ON \
|
-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
|
-DGMIO_FLOAT2STR_LIB=$TRAVIS_FLOAT2STR_LIB
|
||||||
|
|
||||||
# Make
|
# Make
|
||||||
make -j4 VERBOSE=1
|
make -j4 VERBOSE=1
|
||||||
make install
|
make install
|
||||||
make check # Unit tests
|
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