# Travis-CI configuration file for UCAPA
#
# Configuration manual:
# http://docs.travis-ci.com/user/build-configuration/
#
language: cpp

compiler:
  - gcc
#  - clang # Not correctly configured yet

#branches:
# only:
# - master

before_install:
  - sudo apt-add-repository --remove http://www.rabbitmq.com/debian/dists/testing/
  - sudo apt-get update -qq

install:
#  - sudo apt-get install libavcodec-dev libavformat-dev libavutil-dev libswscale-dev # We will need to create our own build of ffmpeg
  - sudo apt-get install libbz2-dev
  - sudo apt-get install yasm libva-dev zlib1g-dev
  # We need cmake >= 2.8.9
  - sudo apt-add-repository "deb http://archive.ubuntu.com/ubuntu quantal main restricted"
  - sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 3B4FE6ACC0B21F32
  - sudo apt-get update -qq
  - sudo apt-get install cmake
  # We need g++ >= 4.7 (for atomic)
  - sudo apt-get install g++
  - g++ --version

before_script:
  # Asio
  - wget "http://downloads.sourceforge.net/project/asio/asio/1.10.1%20%28Stable%29/asio-1.10.1.tar.bz2?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fasio%2Ffiles%2Fasio%2F1.10.1%2520%2528Stable%2529%2F&ts=1396120955&use_mirror=heanet" -O ./asio-1.10.1.tar.bz2
  - mkdir external
  - tar -xf asio-1.10.1.tar.bz2 -C external/
  - mv external/asio-1.10.1 external/asio
  # FFmpeg
  - wget ffmpeg.org/releases/ffmpeg-2.2.tar.bz2 -O ffmpeg-2.2.tar.bz2
  - tar -xf ffmpeg-2.2.tar.bz2 -C external/
  - cd external/ffmpeg-2.2/
  - ./configure --prefix=../ffmpeg --enable-pic --enable-shared --disable-programs --disable-doc
#  - ./configure --prefix=../ffmpeg --disable-programs --disable-doc
  - make -j6
  - make install
  - cd ../../

script:
  - mkdir build
  - cd build
#  - cmake .. -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=TRUE # Shared build
  - cmake .. -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=FALSE # Static build
  - make VERBOSE=1 -j4

Add configuration file for Travis CI.
Add configuration file for Travis CI.
