Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
# Prevent Travis from exporting CXX after matrix env
language: c

sudo: false
language: generic

matrix:
include:
Expand All @@ -13,15 +10,19 @@ matrix:
- os: linux
compiler: clang
env: CXX=clang++-3.5 NODE_VERSION=5
sudo: false
- os: linux
compiler: clang
env: CXX=clang++-3.5 NODE_VERSION=4
sudo: false
- os: linux
compiler: clang
env: CXX=clang++-3.5 NODE_VERSION=0.12
sudo: false
- os: linux
compiler: clang
env: CXX=clang++-3.5 NODE_VERSION=0.10
sudo: false
# OS X
- os: osx
osx_image: xcode7
Expand Down Expand Up @@ -52,17 +53,16 @@ env:

before_install:
- export COVERAGE=${COVERAGE:-false}
- export PYTHONUSERBASE=$(pwd)/.local
- mkdir -p ${PYTHONUSERBASE}
- if [[ ${COVERAGE} == true ]]; then
brew update;
brew install pyenv;
eval "$(pyenv init -)";
pyenv install 2.7.6;
pyenv global 2.7.6;
pyenv rehash;
pip install cpp-coveralls;
pyenv rehash;
if [[ $(uname -s) == 'Linux' ]]; then
pip install --user cpp-coveralls;
else
easy_install --user cpp-coveralls;
fi;
fi;
- ./scripts/install_node.sh
- source ./scripts/install_node.sh ${NODE_VERSION}

install:
- ./scripts/install.sh
Expand Down
3 changes: 0 additions & 3 deletions scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ set -o pipefail

source ./scripts/install_mason.sh

source ~/.nvm/nvm.sh
nvm use ${NODE_VERSION}

if [[ ${COVERAGE} == true ]]; then
npm install --build-from-source --debug --clang;
else
Expand Down
20 changes: 15 additions & 5 deletions scripts/install_node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,24 @@
set -e
set -o pipefail

if [ ! -d ~/.nvm ]; then
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.28.0/install.sh | bash
if [[ ${1:-false} == 'false' ]]; then
echo "Error: pass node version as first argument"
exit 1
fi

source ~/.nvm/nvm.sh
NODE_VERSION=$1

nvm install ${NODE_VERSION}
nvm alias default ${NODE_VERSION}
# 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
set +e
set +u
source ./__nvm/nvm.sh
nvm install ${NODE_VERSION}
nvm use ${NODE_VERSION}
node --version
npm --version
which node
5 changes: 1 addition & 4 deletions scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,8 @@
set -e
set -o pipefail

source ~/.nvm/nvm.sh
nvm use ${NODE_VERSION}

npm test

if [[ ${COVERAGE} == true ]]; then
cpp-coveralls --exclude node_modules --exclude tests --build-root build --gcov-options '\-lp' --exclude doc --exclude build/Debug/obj/gen
${PYTHONUSERBASE}/bin/cpp-coveralls --exclude node_modules --exclude mason_packages --exclude tests --build-root build --gcov-options '\-lp' --exclude doc --exclude build/Debug/obj/gen
fi
2 changes: 0 additions & 2 deletions scripts/travis_publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ COMMIT_MESSAGE=$(git show -s --format=%B $TRAVIS_COMMIT | tr -d '\n')
PACKAGE_JSON_VERSION=$(node -e "console.log(require('./package.json').version)")

if [[ ${TRAVIS_TAG} == v${PACKAGE_JSON_VERSION} ]] || test "${COMMIT_MESSAGE#*'[publish binary]'}" != "$COMMIT_MESSAGE" && [[ ${COVERAGE} == false ]]; then
source ~/.nvm/nvm.sh
nvm use $NODE_VERSION

npm install aws-sdk

Expand Down