language: node_js

cache:
  npm: true
  ccache: true

node_js:
  - stable
  - 13
  - 10
  - 8

os:
  - linux
  - osx

addons:
  apt:
    sources:
      - ubuntu-toolchain-r-test
    packages:
      - doxygen
      - g++-4.8

# Install scripts. (runs after repo cloning)
install:
  - if [ $TRAVIS_OS_NAME == "linux" ]; then export CXX=g++-4.8; fi
  # install modules
  - npm install --build-from-source

# Post-install test scripts.
script:
  - export PATH="/usr/lib/ccache/:$PATH"
  - if [ $TRAVIS_NODE_VERSION == "stable" ]; then
      make test VERBOSE=1;
      make package VERBOSE=1;
      make benchmark VERBOSE=1;
    fi

  - npm test

after_success:
  - npm run deploy
