sudo: false

language: cpp

env:
  - NODE_VERSION=0.10
  - NODE_VERSION=0.12

os:
- linux
- osx

matrix:
  allow_failures:
    - os: osx

install:
- export CXX="g++-4.8" CC="gcc-4.8"
- rm -rf ~/.nvm
- wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.26.1/install.sh | bash
- source ~/.nvm/nvm.sh
- nvm install "${NODE_VERSION}"
- npm install -g npm@^2.14.2
- test "x${TRAVIS_OS_NAME}x" = "xosxx" && brew install scons || true
- npm install -g grunt-cli

addons:
  apt:
    sources:
    - ubuntu-toolchain-r-test
    packages:
    - libboost-all-dev
    - libcurl4-openssl-dev
    - uuid-dev
    - g++-4.8

script: npm run-script ci

sudo: false

language: cpp

matrix:
  include:
    - env: NODE_VERSION=0.10 BUILD_ONLY=false
      os: linux
    - env: NODE_VERSION=0.12 BUILD_ONLY=false
      os: linux
    - env: NODE_VERSION=0.12 BUILD_ONLY=true
      os: osx

    # Allowed failures must be specified twice - once in "include" to have them
    # run, and again in "allowed_failures" to not have them break the build.
    # Below are the allowed failures:

    - env: NODE_VERSION=0.10 BUILD_ONLY=false
      os: osx
    - env: NODE_VERSION=0.12 BUILD_ONLY=false
      os: osx

  allow_failures:
    - env: NODE_VERSION=0.10 BUILD_ONLY=false
      os: osx
    - env: NODE_VERSION=0.12 BUILD_ONLY=false
      os: osx

install:
- if test "x${TRAVIS_OS_NAME}x" = "xlinuxx"; then export CXX="g++-4.8" CC="gcc-4.8"; fi
- rm -rf ~/.nvm
- wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.26.1/install.sh | bash
- source ~/.nvm/nvm.sh
- nvm install "${NODE_VERSION}"
- npm install -g npm@^2.14.2
- if test "x${TRAVIS_OS_NAME}x" = "xosxx"; then brew install scons; fi
- npm install -g grunt-cli

addons:
  apt:
    sources:
    - ubuntu-toolchain-r-test
    packages:
    - libboost-all-dev
    - libcurl4-openssl-dev
    - uuid-dev
    - g++-4.8

script: if test "x${BUILD_ONLY}x" = "xtruex"; then npm install; else npm run-script ci; fi

Use default compiler (clang) on OSX and force OSX build-only to pass
CI: Use default compiler (clang) on OSX and force OSX build-only to pass

This also introduces a more flexible way of defining travis jobs.
