diff options
Diffstat (limited to 'travis.sh')
-rwxr-xr-x | travis.sh | 31 |
1 files changed, 30 insertions, 1 deletions
@@ -28,6 +28,16 @@ withprotobuf_script() { make test } +# Build with strict warnings. +warnings_install() { + : +} +warnings_script() { + make -j12 default WITH_MAX_WARNINGS=yes + make -j12 tests WITH_MAX_WARNINGS=yes + make test +} + # A 32-bit build. Can only test the core because any dependencies # need to be available as 32-bit libs also, which gets hairy fast. # Can't enable the JIT because it only supports x64. @@ -49,7 +59,26 @@ lua_script() { make -j12 testlua USER_CPPFLAGS=`pkg-config lua5.2 --cflags` } +# A run that executes with coverage support and uploads to coveralls.io +coverage_install() { + sudo apt-get update -qq + sudo apt-get install protobuf-compiler libprotobuf-dev lua5.2 liblua5.2-dev + sudo pip install cpp-coveralls +} +coverage_script() { + make -j12 tests googlepbtests testlua WITH_JIT=yes \ + USER_CPPFLAGS="--coverage -O0 `pkg-config lua5.2 --cflags`" + make test +} +coverage_after_success() { + coveralls --exclude dynasm --exclude tests --exclude upb/bindings/linux --gcov-options '\-lp' +} + +if [ "$1" == "after_success" ] && [ "$UPB_TRAVIS_BUILD" != "coverage" ]; then + # after_success is only used for coverage. + exit +fi + set -e set -x eval ${UPB_TRAVIS_BUILD}_${1} - |