diff --git a/.travis.yml b/.travis.yml index 6ba063a..224479d 100755 --- a/.travis.yml +++ b/.travis.yml @@ -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 + - travis_retry npm install script: - npm test