language: cpp
compiler: clang
sudo:     required
dist:     trusty
group:    edge

git:
  depth: 1

branches:
  except: master

notifications:
  email: false
  irc:
    channels:
    on_success: always
    on_failure: always
    on_start:   never
  webhooks:
    urls: https://webhooks.gitter.im/e/1fcf27221a4243f787d8
    on_success: always
    on_failure: always
    on_start:   never

before_install:
  - PROJECT_NAME='av-caster'
  - DEPS='libfreetype6-dev libgstreamer-plugins-base1.0-dev libx11-dev
          libxcursor-dev libxinerama-dev libxrandr-dev'
  - # the trusty version of libircclient is incompatible
  - LIBIRCCLIENT_MIRROR="http://mirrors.kernel.org/ubuntu/pool/universe/libi/libircclient"
  - LIBIRCCLIENT="libircclient1_1.8-2_amd64.deb"
  - LIBIRCCLIENTDEV="libircclient-dev_1.8-2_amd64.deb"
  - BUILD_DIR=$TRAVIS_BUILD_DIR/Builds/Makefile

script:
  - echo "building 64-bit $PROJECT_NAME"
  - cd $BUILD_DIR
  - sudo apt-get update -qq
  - sudo apt-get install -y $DEPS
  - wget $LIBIRCCLIENT_MIRROR/$LIBIRCCLIENT
  - wget $LIBIRCCLIENT_MIRROR/$LIBIRCCLIENTDEV
  - sudo dpkg -i $LIBIRCCLIENT
  - sudo dpkg -i $LIBIRCCLIENTDEV
  - CFLAGS="-Wno-dangling-else -Wno-deprecated-register" make

after_script:
  - echo "build stage ended"
  - ls -l $BUILD_DIR/build/
