language: cpp
compiler:
  - gcc
#  - clang
# Make sure CMake is installed
install:
 - sudo apt-add-repository -y ppa:ubuntu-toolchain-r/test
 - sudo add-apt-repository -y ppa:boost-latest/ppa
 - sudo apt-get update >/dev/null
 - sudo apt-get -q install libprotoc-dev libprotobuf7 libprotobuf-dev libosmpbf-dev libbz2-dev libstxxl-dev libstxxl1 libxml2-dev libzip-dev lua5.1 liblua5.1-0-dev rubygems
 - sudo apt-get -q install g++-4.7
 - sudo apt-get install libboost1.54-all-dev
 #luabind
 - curl https://gist.githubusercontent.com/DennisOSRM/f2eb7b948e6fe1ae319e/raw/install-luabind.sh | sudo bash
 #osmosis
 - curl -s https://gist.githubusercontent.com/DennisOSRM/803a64a9178ec375069f/raw/ | sudo bash
before_script:
 - rvm use 1.9.3
 - gem install bundler
 - bundle install
 - mkdir build
 - cd build
 - cmake .. $CMAKEOPTIONS
script:
 - make -j 2
 - cd ..
 - cucumber -p verify
after_script:
# - cd ..
# - cucumber -p verify
branches:
  only:
    - master
    - develop
cache:
- bundler
- apt
env:
 - CMAKEOPTIONS="-DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=g++-4.7" OSRM_PORT=5000 OSRM_TIMEOUT=60
 - CMAKEOPTIONS="-DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER=g++-4.7" OSRM_PORT=5010 OSRM_TIMEOUT=60
notifications:
 irc:
  channels:
    - irc.oftc.net#osrm
  on_success: change
  on_failure: always
  use_notice: true
  skip_join: false

  recipients:
    - dennis@mapbox.com
  email:
    on_success: change
    on_failure: always