language: cpp
compiler: gcc
dist: xenial
sudo: required
cache:
    directories:
        - $HOME/apt_mingw_cache
        - $HOME/.ccache
        - $HOME/pbuilder-bases
matrix:
    include:
        - env: TARGET_OS=win32
          dist: trusty
        - env: TARGET_OS=win64
          dist: trusty
        - os: osx
          osx_image: xcode8.2
        - env: QT5=
        - env: QT5=True
        - env: QT5=True TARGET_OS=win32 TARGET_DEPLOY=True
          dist: trusty
        - env: QT5=True TARGET_OS=win64 TARGET_DEPLOY=True
          dist: trusty
        - os: osx
          osx_image: xcode8.2
          env: QT5=True
        - env: TARGET_OS=debian-sid TARGET_DEPLOY=True
          git:
              depth: false
        - env: TARGET_OS=debian-sid TARGET_ARCH=i386
          git:
              depth: false
        - compiler: clang
          env: TARGET_OS=debian-sid
          git:
              depth: false
before_install:
   - . ${TRAVIS_BUILD_DIR}/.travis/${TRAVIS_OS_NAME}.${TARGET_OS}.before_install.sh
install:
    - . ${TRAVIS_BUILD_DIR}/.travis/${TRAVIS_OS_NAME}.${TARGET_OS}.install.sh
before_script:
    - export CMAKE_FLAGS="-DWANT_QT5=$QT5 -DUSE_WERROR=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUNDLE_QT_TRANSLATIONS=ON"
    - if [ -z "$TRAVIS_TAG" ]; then export CMAKE_FLAGS="$CMAKE_FLAGS -DUSE_CCACHE=ON"; fi
script:
    - . ${TRAVIS_BUILD_DIR}/.travis/${TRAVIS_OS_NAME}.${TARGET_OS}.script.sh
after_script:
    - ccache -s
notifications:
    webhooks:
       urls:
           - https://webhooks.gitter.im/e/1ac7fc698195981a9227
       on_success: change  # options: [always|never|change] default: always
       on_failure: always  # options: [always|never|change] default: always
       on_start: never     # options: [always|never|change] default: always 
