sudo: required
language: node_js
os:
  - linux
  - osx
node_js:
  - "5.9"
env:
  - CXX=g++-4.8
addons:
  artifacts:
    paths:
    - ./releases/
  apt:
    sources:
      - ubuntu-toolchain-r-test
    packages:
      - g++-4.8
script:
  - npm run build
  - npm run lint
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then npm run package-osx; fi
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then npm run package-linux; fi
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then zip -r ./releases/postgis-editor-darwin-x64.zip ./releases/postgis-editor-darwin-x64; fi
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then zip -r ./releases/postgis-editor-linux-x64.zip ./releases/postgis-editor-linux-x64; fi
  - rm -rf ./releases/postgis-editor-linux-x64
  - rm -rf ./releases/postgis-editor-darwin-x64

sudo: required
matrix:
  include:
   - os: linux
     env: CXX=g++-4.8
  allow_failures:
    - os: osx
language: node_js
os:
  - linux
  - osx
node_js:
  - "5.9"
addons:
  artifacts:
    paths:
    - ./releases/
  apt:
    sources:
      - ubuntu-toolchain-r-test
    packages:
      - g++-4.8
script:
  - npm run build
  - npm run lint
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then npm run package-osx; fi
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then npm run package-linux; fi
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then zip -r ./releases/postgis-editor-darwin-x64.zip ./releases/postgis-editor-darwin-x64; fi
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then zip -r ./releases/postgis-editor-linux-x64.zip ./releases/postgis-editor-linux-x64; fi
  - rm -rf ./releases/postgis-editor-linux-x64
  - rm -rf ./releases/postgis-editor-darwin-x64

Use clang for OSX and gcc for Linux
Use clang for OSX and gcc for Linux
