2015-12-20 15:09:35 -08:00
|
|
|
language: c
|
|
|
|
|
|
|
|
sudo: false
|
|
|
|
|
|
|
|
matrix:
|
2015-12-20 15:11:15 -08:00
|
|
|
include:
|
2015-12-20 15:09:35 -08:00
|
|
|
- os: linux
|
2015-12-22 17:08:41 -08:00
|
|
|
compiler: gcc
|
2015-12-22 17:16:55 -08:00
|
|
|
env: COVERAGE=gcov-4.9
|
2015-12-22 16:55:21 -08:00
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
sources: ['ubuntu-toolchain-r-test']
|
|
|
|
packages: [ 'g++-4.9', 'protobuf-compiler', 'libprotobuf-dev' ]
|
2015-12-22 17:08:41 -08:00
|
|
|
- os: linux
|
|
|
|
compiler: clang
|
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
packages: [ 'protobuf-compiler', 'libprotobuf-dev' ]
|
2015-12-22 16:30:28 -08:00
|
|
|
- os: osx
|
2015-12-22 17:08:41 -08:00
|
|
|
compiler: clang
|
2015-12-20 15:09:35 -08:00
|
|
|
|
|
|
|
|
|
|
|
install:
|
2015-12-22 16:30:28 -08:00
|
|
|
- if [[ $(uname -s) == 'Darwin' ]]; then brew install protobuf; fi;
|
2015-12-22 16:55:21 -08:00
|
|
|
- if [ -n "${COVERAGE}" ]; then
|
2015-12-22 17:16:55 -08:00
|
|
|
export CXX=g++-4.9;
|
|
|
|
export CC=gcc-4.9;
|
2015-12-22 17:08:41 -08:00
|
|
|
export CXXFLAGS="--coverage -g";
|
|
|
|
export CFLAGS="--coverage -g";
|
2015-12-22 16:55:21 -08:00
|
|
|
export LDFLAGS="--coverage";
|
|
|
|
fi;
|
2015-12-20 15:09:35 -08:00
|
|
|
- make
|
|
|
|
|
|
|
|
script:
|
2016-01-28 10:54:51 -08:00
|
|
|
- make test
|
2015-12-22 16:55:21 -08:00
|
|
|
- if [ -n "${COVERAGE}" ]; then
|
2015-12-22 17:23:56 -08:00
|
|
|
rm vector_tile.pb.o;
|
2015-12-22 16:55:21 -08:00
|
|
|
${COVERAGE} -lp *.o;
|
|
|
|
pip install --user cpp-coveralls;
|
2015-12-22 17:20:59 -08:00
|
|
|
~/.local/bin/coveralls --no-gcov -i ./ --exclude clipper --exclude vector_tile.pb.cc --exclude vector_tile.pb.h;
|
2015-12-22 16:55:21 -08:00
|
|
|
fi
|