sudo: required
dist: trusty

language: node_js

branches:
  only:
    - master

matrix:
  include:
    - os: linux
      node_js: 7
      env: CC=clang CXX=clang++ npm_config_clang=1
      compiler: clang

addons:
  apt:
    packages:
      - libgnome-keyring-dev
      - libicns
      - graphicsmagick
      - xz-utils
      - rpm
      - bsdtar

before_install:
  - npm install -g yarn

cache: yarn

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

install:
- export CXX="g++-6"
- yarn
- "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16"

before_script:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start &
- sleep 3

script:
- yarn run lint
- yarn run test
- yarn run package