language: cpp

os:
  - linux
  - osx

sudo: false

addons:
  apt:
    sources:
      - ubuntu-toolchain-r-test
    packages:
      - libzmq3-dev
      - libprotobuf-dev
      - graphicsmagick
      - rethinkdb
      - g++-4.9
      - yasm

env:
  matrix:
    - NODE_VERSION=0.12
    - NODE_VERSION=4

before_install:
  - rm -rf ~/.nvm && git clone --depth 1 https://github.com/creationix/nvm.git ~/.nvm
  - source ~/.nvm/nvm.sh
  - nvm install $NODE_VERSION
  - node --version
  - npm --version
  - if [ "${TRAVIS_OS_NAME}" == "linux" ]; then export CXX=g++-4.9; fi
  - if [ "${TRAVIS_OS_NAME}" == "osx" ]; then brew install rethinkdb graphicsmagick zeromq protobuf yasm pkg-config; fi

install:
  - npm install
  - export PATH=$PWD/node_modules/.bin:$PATH

script:
  - gulp build

cache:
  directories:
    - node_modules
    - res/bower_components

notifications:
  slack: openstf:qu01BtEgttJOrGGsRxKBJwki
