language: cpp
before_install:
  - $CXX --version
  - sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
  - sudo apt-get update -qq
  - sudo apt-get install -qq g++-4.9
  - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 90
  - sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.9 90
  - sudo update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-4.9 90
  - sudo apt-get install libeigen3-dev
  - sudo apt-add-repository "deb http://archive.ubuntu.com/ubuntu/ trusty main restricted" -y
  - sudo apt-get update -qq
  - wget http://ftp.de.debian.org/debian/pool/main/l/lcov/lcov_1.11.orig.tar.gz
  - tar xf lcov_1.11.orig.tar.gz
  - sudo make -C lcov-1.11/ install
  # install lcov to coveralls conversion + upload tool
  - gem install coveralls-lcov
#  - sudo apt-get install libeigen3-dev
script:
  - mkdir build
  - cd build
  - cmake -DCMAKE_BUILD_TYPE=Debug ..
  - make
  - ./unit_tests
  - lcov --capture --no-external --directory . --base-directory ../fung --output-file coverage.info
  - cd ..
after_success:
  - cd build
  - sed 's@/home/travis/build/lubkoll/FunG/@/@g' coverage.info
  - coveralls-lcov --repo-token fPyYknPYYq6DiXlBDUOXzHGq8RUI6o8QO coverage.info



