matrix:
  include:
  - os: linux
    dist: xenial
    sudo: required
    language: node_js
    node_js:
    - '6'
  - os: osx
    osx_image: xcode7.3.1
    language: generic
    node_js:
    - '6'

branches:
  only:
    - master
    - develop

addons:
  apt:
    packages:
    - rpm
    - g++-multilib
    - snapcraft
    - snapd

before_script:
 - chmod +x ./scripts/travis-build.sh

script: ./scripts/travis-build.sh

cache:
  directories:
    - node_modules

notifications:
  email:
    on_success: never
    on_failure: change

matrix:
  include:
  - os: linux
    dist: xenial
    sudo: required
    language: node_js
    node_js:
    - '6'
    before_install:
    - sudo apt-get -qq update
    - sudo apt-get install -y rpm g++-multilib snapcraft snapd
  - os: osx
    osx_image: xcode7.3.1
    language: generic
    node_js:
    - '6'

branches:
  only:
    - master
    - develop

before_script:
  - chmod +x ./scripts/travis-build.sh

script: ./scripts/travis-build.sh

cache:
  directories:
    - node_modules

notifications:
  email:
    on_success: never
    on_failure: change

Move linux package installs to `before_install`
Travis: Move linux package installs to `before_install`
