Commit 4187d2c3 by Dane Springmeyer

Merge pull request #541 from mapbox/coverage

Coverage
parents 6df7b67b fd0d233f
sudo: false sudo: false
language: cpp # Using c here rather than cpp to avoid Travis exporting CXX after matrix env
language: c
git: git:
depth: 10 depth: 10
...@@ -21,86 +22,10 @@ branches: ...@@ -21,86 +22,10 @@ branches:
matrix: matrix:
include: include:
# Linux
- os: linux
compiler: clang
env: NODE_VERSION="5"
addons:
apt:
sources: [ 'ubuntu-toolchain-r-test','llvm-toolchain-precise-3.5', 'gcc-multilib', 'g++-multilib', 'libsqlite3-dev:i386' ]
packages: [ 'clang-3.5']
- os: linux
compiler: clang
env: NODE_VERSION="4"
addons:
apt:
sources: [ 'ubuntu-toolchain-r-test','llvm-toolchain-precise-3.5', 'gcc-multilib', 'g++-multilib', 'libsqlite3-dev:i386' ]
packages: [ 'clang-3.5']
- os: linux
compiler: clang
env: NODE_VERSION="iojs-3.1.0"
addons:
apt:
sources: [ 'ubuntu-toolchain-r-test','llvm-toolchain-precise-3.5', 'gcc-multilib', 'g++-multilib', 'libsqlite3-dev:i386' ]
packages: [ 'clang-3.5']
- os: linux
compiler: clang
env: NODE_VERSION="iojs-2.4.0"
addons:
apt:
sources: [ 'ubuntu-toolchain-r-test','llvm-toolchain-precise-3.5', 'gcc-multilib', 'g++-multilib', 'libsqlite3-dev:i386' ]
packages: [ 'clang-3.5']
- os: linux
compiler: clang
env: NODE_VERSION="iojs-1.8.4"
addons:
apt:
sources: [ 'ubuntu-toolchain-r-test','llvm-toolchain-precise-3.5', 'gcc-multilib', 'g++-multilib', 'libsqlite3-dev:i386' ]
packages: [ 'clang-3.5']
- os: linux
compiler: clang
env: NODE_VERSION="0.12.7"
addons:
apt:
sources: [ 'ubuntu-toolchain-r-test','llvm-toolchain-precise-3.5', 'gcc-multilib', 'g++-multilib', 'libsqlite3-dev:i386' ]
packages: [ 'clang-3.5']
- os: linux
compiler: clang
env: NODE_VERSION="0.10.40"
addons:
apt:
sources: [ 'ubuntu-toolchain-r-test','llvm-toolchain-precise-3.5', 'gcc-multilib', 'g++-multilib', 'libsqlite3-dev:i386' ]
packages: [ 'clang-3.5']
# test building against external sqlite
- os: linux
compiler: clang
env: NODE_VERSION="0.10.40" EXTERNAL_SQLITE=true PUBLISHABLE=false
addons:
apt:
sources: [ 'ubuntu-toolchain-r-test','llvm-toolchain-precise-3.5', 'gcc-multilib', 'g++-multilib', 'libsqlite3-dev:i386' ]
packages: [ 'clang-3.5','libsqlite3-dev']
# OS X # OS X
- os: osx - os: osx
compiler: clang compiler: clang
env: NODE_VERSION="5" # node abi 47 env: NODE_VERSION="5" COVERAGE=true PUBLISHABLE=false # node abi 47
- os: osx
compiler: clang
env: NODE_VERSION="4" # node abi 46
- os: osx
compiler: clang
env: NODE_VERSION="iojs-3.1.0" # node abi 46
- os: osx
compiler: clang
env: NODE_VERSION="iojs-2.4.0" # node abi 44
- os: osx
compiler: clang
env: NODE_VERSION="iojs-1.8.4" # node abi 43
- os: osx
compiler: clang
env: NODE_VERSION="0.12.7" # node abi 14
- os: osx
compiler: clang
env: NODE_VERSION="0.10.40" # node abi 11
env: env:
global: global:
...@@ -110,9 +35,13 @@ env: ...@@ -110,9 +35,13 @@ env:
before_install: before_install:
- export PUBLISHABLE=${PUBLISHABLE:-true} - export PUBLISHABLE=${PUBLISHABLE:-true}
- export COVERAGE=${COVERAGE:-false}
- if [[ $(uname -s) == 'Linux' ]]; then - if [[ $(uname -s) == 'Linux' ]]; then
export CXX="clang++-3.5"; export CXX="clang++-3.5";
export CC="clang-3.5"; export CC="clang-3.5";
export PYTHONPATH=$(pwd)/py-local/lib/python2.7/site-packages;
else
export PYTHONPATH=$(pwd)/py-local/lib/python/site-packages;
fi; fi;
- scripts/validate_tag.sh - scripts/validate_tag.sh
- source ./scripts/install_node.sh ${NODE_VERSION} - source ./scripts/install_node.sh ${NODE_VERSION}
...@@ -124,6 +53,13 @@ install: ...@@ -124,6 +53,13 @@ install:
before_script: before_script:
# get commit message # get commit message
- export COMMIT_MESSAGE=$(git show -s --format=%B $TRAVIS_COMMIT | tr -d '\n') - export COMMIT_MESSAGE=$(git show -s --format=%B $TRAVIS_COMMIT | tr -d '\n')
- if [[ ${COVERAGE} == true ]]; then
if [[ $(uname -s) == 'Linux' ]]; then
PYTHONUSERBASE=$(pwd)/py-local pip install --user cpp-coveralls;
else
PYTHONUSERBASE=$(pwd)/py-local easy_install --user cpp-coveralls;
fi;
fi
script: script:
- if [[ "${NODE_VERSION}" ]]; then ./scripts/build_against_node.sh; fi; - if [[ "${NODE_VERSION}" ]]; then ./scripts/build_against_node.sh; fi;
......
...@@ -14,8 +14,15 @@ function publish() { ...@@ -14,8 +14,15 @@ function publish() {
} }
# test installing from source # test installing from source
npm install --build-from-source --clang=1 if [[ ${COVERAGE} == true ]]; then
npm test CXXFLAGS="--coverage" LDFLAGS="--coverage" npm install --build-from-source --clang=1 --verbose
npm test
./py-local/bin/cpp-coveralls --exclude node_modules --exclude tests --build-root build --gcov-options '\-lp' --exclude docs --exclude build/Release/obj/gen --exclude deps
else
npm install --build-from-source --clang=1
npm test
fi
publish publish
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment