language: cpp
sudo: required
dist: trusty
compiler:
- g++
os:
- linux

addons:
    apt:
        sources:
            - ubuntu-toolchain-r-test
        packages:
            - gcc-5
            - g++-5
            - lcov
            - libboost-all-dev
            - libgtest-dev


branches:
  only:
  - master

before_install:
    - sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 50
    - sudo wget https://github.com/google/googletest/archive/release-1.7.0.tar.gz
    - sudo tar xf release-1.7.0.tar.gz
    - cd googletest-release-1.7.0
    - sudo cmake -DBUILD_SHARED_LIBS=ON .
    - sudo make
    - sudo cp -a include/gtest /usr/include
    - sudo cp -a libgtest_main.so libgtest.so /usr/lib/
    - cd ..

install:
    - g++ --version

script: ./run_build.sh

notifications:
  email:
    - teemperor@gmail.com

env:
  global:
  - LANG="en_US.UTF-8"