Add Travis script for Coveralls.io

This commit is contained in:
Tim Rühsen 2016-09-27 11:48:27 +02:00
parent 598a78b2de
commit 8a62205004
3 changed files with 11 additions and 3 deletions

View File

@ -10,6 +10,7 @@ branches:
only:
- master
- develop
- coveralls
env:
- RUNTIME=libicu
@ -34,6 +35,7 @@ addons:
- libicu-dev
- libunistring0
- libunistring-dev
- lcov
script:
- ./autogen.sh
@ -44,3 +46,4 @@ script:
- ./configure --enable-runtime=$RUNTIME --disable-builtin && make clean && make -j4 && make check -j4
- ./configure --enable-gtk-doc && make -j4 && make check -j4
- make distcheck
- if [[ $CC == "gcc" && $RUNTIME == "libicu" ]]; then ./.travis_coveralls.sh; fi

5
.travis_coveralls.sh Executable file
View File

@ -0,0 +1,5 @@
#!/bin/bash
make check-coverage-libicu
pip install --user cpp-coveralls
coveralls --include libwget/ --include src/ -e "src/psl2c.c"

View File

@ -30,11 +30,11 @@ check-coverage:
CFLAGS=$$CFLAGS" --coverage -O0" LDFLAGS=$$LDFLAGS" --coverage" ./configure --enable-runtime=$(XLIB) --enable-builtin=$(XLIB); \
fi
$(MAKE) clean && $(MAKE)
lcov --no-external --capture --initial --directory src --output-file libpsl.info
lcov --capture --initial --directory src --output-file libpsl.info
$(MAKE) check
lcov --no-external --capture --directory src --output-file libpsl.info
lcov --capture --directory src --output-file libpsl.info
lcov --remove libpsl.info 'src/psl2c.c' -o libpsl.info
genhtml --prefix . --ignore-errors source libpsl.info --legend --title "libpsl" --output-directory=lcov
genhtml --prefix . libpsl.info --legend --title "libpsl" --output-directory=lcov
check-coverage-libidn:
XLIB=libidn $(MAKE) check-coverage