Skip to content

Commit

Permalink
Test Travis CI on OS X and Linux for multiple node versions on Docker.
Browse files Browse the repository at this point in the history
  • Loading branch information
erictaylor committed Nov 20, 2015
1 parent 24ec907 commit f34e406
Showing 1 changed file with 25 additions and 17 deletions.
42 changes: 25 additions & 17 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,27 @@
language: node_js
node_js:
- 0.12
- 4
- 5

before_install:
# We need this line to have g++4.8 available in apt
- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
- sudo apt-get update -qq
- sudo apt-get install -qq gcc-4.8 g++-4.8
# We want to compile with g++ 4.8 when rather than the default g++
- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 90

before_script:
- npm install --dev

os:
- linux
- osx
sudo: false
language: cpp
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.8
env:
matrix:
- TRAVIS_NODE_VERSION="0.12"
- TRAVIS_NODE_VERSION="4"
- TRAVIS_NODE_VERSION="5"
cache:
directories:
- node_modules
install:
- rm -rf ~/.nvm && git clone https://github.com/creationix/nvm.git ~/.nvm && (cd ~/.nvm && git checkout `git describe --abbrev=0 --tags`) && source ~/.nvm/nvm.sh && nvm install $TRAVIS_NODE_VERSION
- node --version
- if [[ $TRAVIS_OS_NAME == "linux" ]]; then export CXX=g++-4.8; fi
- $CXX --version
- npm install
script:
- npm test

0 comments on commit f34e406

Please sign in to comment.