dist: trusty
sudo: required

language: generic

addons:
  apt:
    sources:
      - ubuntu-toolchain-r-test
    packages:
      - jam
      - binutils-mingw-w64-i686
      - gcc-mingw-w64-i686
      - g++-mingw-w64-i686
      - gcc-4.8
      - g++-4.8
      - gcc-6
      - g++-6
      - libsdl1.2-dev
      - libsdl-mixer1.2-dev
      - libsdl-sound1.2-dev
      - libgtk2.0-dev

script:
  - jam -sC++=$CXX -sCC=$CC -j4

matrix:
  include:
    # MinGW
    # Ideally this would build with TTS support, but the available MinGW
    # version on Travis is too old to support SAPI.
    - env: CC=i686-w64-mingw32-gcc CXX=i686-w64-mingw32-g++ OS=MINGW MINGWARCH=i686-w64-mingw32 CROSS=1
    # GCC
    - env: CC=gcc-4.8 CXX=g++-4.8
    - env: CC=gcc-6 CXX=g++-6
    # Clang
    - env: CC=clang CXX=clang++
    # OS X
    - os: osx
      before_install:
        - brew update
        - brew install sdl sdl_mixer sdl_sound smpeg libvorbis freetype jam
      script: sh gargoyle_osx.sh
