language: c++
compiler:
  - clang
  - gcc
env:
  - TRAVIS_NODE_VERSION="4"
  - TRAVIS_NODE_VERSION="5"
  - TRAVIS_NODE_VERSION="6"
  - TRAVIS_NODE_VERSION="6" NO_CXX=1
os:
  - linux
  - osx
sudo: false
cache:
  - apt
addons:
  apt:
    sources:
      - ubuntu-toolchain-r-test
    packages:
      - g++-4.8
before_install:
  - echo "$TRAVIS_NODE_VERSION"
  - export "PATH=$HOME/.local/bin:./node_modules/.bin:$PWD/node_modules/.bin:$PATH"
  # compilers
  - if [ "$CXX" = "g++" ]; then export CXX="g++-4.8" CC="gcc-4.8"; AR="gcc-ar-4.8"; RANLIB="gcc-ranlib-4.8"; NM="gcc-nm-4.8"; fi
  - if [ "$CXX" = "clang++" ]; then export NPMOPT=--clang=1; fi
  - if [ "$NO_CXX" = "1" ]; then export CXX="false"; fi
  # node versions
  - rm -rf ~/.nvm
  - git clone --branch v0.30.2 https://github.com/creationix/nvm.git ~/.nvm
  - source ~/.nvm/nvm.sh
  - nvm install "$TRAVIS_NODE_VERSION"
  - node --version
install:
  - npm install $NPMOPT
script:
  - npm test

language: c++
compiler:
  - clang
  - gcc
env:
  - TRAVIS_NODE_VERSION="8"
  - TRAVIS_NODE_VERSION="8" NO_CXX=1
  - TRAVIS_NODE_VERSION="6"
  - TRAVIS_NODE_VERSION="4"
os:
  - linux
  - osx
sudo: false
cache:
  - apt
addons:
  apt:
    sources:
      - ubuntu-toolchain-r-test
    packages:
      - g++-4.8
before_install:
  - echo "$TRAVIS_NODE_VERSION"
  - export "PATH=$HOME/.local/bin:./node_modules/.bin:$PWD/node_modules/.bin:$PATH"
  # compilers
  - if [ "$CXX" = "g++" ]; then export CXX="g++-4.8" CC="gcc-4.8"; AR="gcc-ar-4.8"; RANLIB="gcc-ranlib-4.8"; NM="gcc-nm-4.8"; fi
  - if [ "$CXX" = "clang++" ]; then export NPMOPT=--clang=1; fi
  - if [ "$NO_CXX" = "1" ]; then export CXX="false"; fi
  # node versions
  - rm -rf ~/.nvm
  - git clone --branch v0.30.2 https://github.com/creationix/nvm.git ~/.nvm
  - source ~/.nvm/nvm.sh
  - nvm install "$TRAVIS_NODE_VERSION"
  - node --version
install:
  - npm install $NPMOPT
script:
  - npm test

Add Node 8 to CI matrix
Add Node 8 to CI matrix
