Skip to content

Commit

Permalink
build updates: coverage on linux, improved node install, bump to libo…
Browse files Browse the repository at this point in the history
…smium 2.6.1
  • Loading branch information
Dane Springmeyer committed Mar 30, 2016
1 parent 62f4437 commit e5b6770
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 9 deletions.
11 changes: 6 additions & 5 deletions .travis.yml
Expand Up @@ -24,6 +24,7 @@ addons:
- llvm-toolchain-precise-3.5
packages:
- clang-3.5
- llvm-3.5-dev

cache:
directories:
Expand All @@ -35,14 +36,14 @@ matrix:
- os: linux
compiler: clang
env: NODE_VERSION="0.10.40"
# Coverage
- os: linux
compiler: clang
env: NODE_VERSION="0.10.40" COVERAGE=true
# OS X
- os: osx
compiler: clang
env: NODE_VERSION="0.10.40"
# Coverage
- os: osx
compiler: clang
env: NODE_VERSION="0.10.40" COVERAGE=true

env:
global:
Expand All @@ -64,7 +65,7 @@ before_install:

install:
- source ./bootstrap.sh
- git clone --depth=1 --branch=v2.6.0 https://github.com/osmcode/libosmium.git ../libosmium
- git clone --depth=1 --branch=v2.6.1 https://github.com/osmcode/libosmium.git ../libosmium

before_script:
- if [[ ${COVERAGE} == true ]]; then
Expand Down
2 changes: 2 additions & 0 deletions scripts/coverage.sh
Expand Up @@ -4,6 +4,8 @@ COVERAGE=${COVERAGE:-false}

if [[ ${COVERAGE} == true ]]; then
./mason_packages/.link/bin/cpp-coveralls \
--gcov /usr/bin/llvm-cov-3.5 \
--exclude __nvm \
--exclude src/node_osmium.hpp \
--exclude src/apply.hpp \
--exclude src/include_v8.hpp \
Expand Down
19 changes: 15 additions & 4 deletions scripts/install_node.sh
@@ -1,10 +1,21 @@
#!/usr/bin/env bash

if [[ ${1:-false} == 'false' ]]; then
echo "Error: pass node version as first argument"
exit 1
fi

NODE_VERSION=$1

# if an existing nvm is already installed we need to unload it
nvm unload || true

# here we set up the node version on the fly based on the matrix value.
# This is done manually so that the build works the same on OS X
rm -rf ~/.nvm/ && git clone --depth 1 https://github.com/creationix/nvm.git ~/.nvm
NODE_VERSION=$1
source ~/.nvm/nvm.sh
rm -rf ./__nvm/ && git clone --depth 1 https://github.com/creationix/nvm.git ./__nvm
source ./__nvm/nvm.sh
nvm install ${NODE_VERSION}
nvm use ${NODE_VERSION}
node --version
npm --version
which node
which node

0 comments on commit e5b6770

Please sign in to comment.