2014-09-05 14:35:50 -04:00
language :
- c
- cpp
2013-11-17 23:58:13 -08:00
2015-11-30 15:05:25 -08:00
# Use Trusty VM
sudo : required
dist : trusty
matrix :
include :
# Test default gcc
- env : GCC_VERSION=4.8
os : linux
compiler : gcc
addons :
apt :
packages :
- lcov
- valgrind
# Test gcc-5.0
- env : GCC_VERSION=5
os : linux
addons :
apt :
packages :
- valgrind
- g++-5
- gcc-5
sources :
- ubuntu-toolchain-r-test
env :
global :
2016-10-30 10:54:47 +01:00
- PROTOBUF_VERSION=3.0.2
2015-11-30 15:05:25 -08:00
- PKG_CONFIG_PATH=$HOME/protobuf-$PROTOBUF_VERSION-bin/lib/pkgconfig
2014-03-31 17:47:29 -04:00
2013-11-17 23:58:13 -08:00
before_install :
2015-11-30 15:05:25 -08:00
- if [ -n "$GCC_VERSION" ]; then export CXX="g++-${GCC_VERSION}" CC="gcc-${GCC_VERSION}"; fi
- if [ -n "$CLANG_VERSION" ]; then export CXX="clang++-${CLANG_VERSION}" CC="clang-${CLANG_VERSION}"; fi
- if [ "$GCC_VERSION" == "4.8" ]; then export CXX="g++" CC="gcc"; fi
- which $CXX
- which $CC
- which valgrind
2013-11-17 23:58:13 -08:00
install :
2015-11-30 15:05:25 -08:00
- pip install --user cpp-coveralls
2016-10-30 10:54:47 +01:00
- wget https://github.com/google/protobuf/archive/v$PROTOBUF_VERSION.tar.gz
- tar xf v$PROTOBUF_VERSION.tar.gz
- ( cd protobuf-$PROTOBUF_VERSION && ./autogen.sh && ./configure --prefix=$HOME/protobuf-$PROTOBUF_VERSION-bin && make -j2 && make install )
2013-11-17 23:58:13 -08:00
script :
2013-11-18 14:35:52 -05:00
- ./autogen.sh
2014-09-05 15:44:47 -04:00
- ./configure && make -j2 distcheck VERBOSE=1 && make clean
2015-11-30 15:05:25 -08:00
- if [ "$GCC_VERSION" != "4.8" ]; then ./configure --enable-valgrind-tests CFLAGS="-fsanitize=undefined -fno-sanitize-recover=undefined" && make -j2 distcheck DISTCHECK_CONFIGURE_FLAGS="--enable-valgrind-tests CFLAGS=\"-fsanitize=undefined -fno-sanitize-recover=undefined\"" VERBOSE=1 && make clean; fi
2014-09-05 15:44:47 -04:00
- if [ "$CC" = "gcc" ]; then ./configure --enable-code-coverage && make -j2 && make check; fi
2014-06-02 18:04:35 -04:00
after_success :
2015-02-14 20:45:04 -08:00
- if [ "$CC" = "gcc" ]; then cpp-coveralls --build-root . --exclude t/ --exclude /usr/include --exclude protobuf-$PROTOBUF_VERSION --exclude protoc-c; fi