language: generic
python:
  - "2.7"
sudo: required
dist: trusty
compiler:
  - gcc
# - clang
env:
  global:
    - secure: "SnIBG/xLIHX3CSvUbqqsX8xTVqIqQ7fFS6HWO6KZQVBsT6yugTwYHbyhNiU531JejYJ/I3ZrDhXfYH3qFZiYxnH1sifvwV+fnTtMXpPN7qPZwIymkjcmm6gJF51e0C7VOfUbvKFv0ngwj+ul21rgZSMuoEvxPK0WxtE3/ZSfn9c="
    - APT_DEPENDENCIES="doxygen libeigen3-dev "
    - DEBSIGN_KEYID=5AE5CD75
    - LCOV_IGNORE_RULES="*unittest* /opt/openrobots/*"
    - CC=gcc
    - DO_COVERAGE_ON_BRANCH="master;release"
    - DO_CPPCHECK_ON_BRANCH=""
  matrix:
    # - BUILDTYPE=Release
    # - BUILDTYPE=Debug
    - BUILDTYPE=Minsizerel
notifications:
email:
  - hpp-source@laas.fr
branches:
only:
  - master
  - debian
  - devel
matrix:
allow_failures:
  - compiler:
before_install: ./travis_custom/custom_before_install
install:
  - pip install --user coveralls
  - pip install --user numpy
script:
  - export CMAKE_ADDITIONAL_OPTIONS="-DCMAKE_BUILD_TYPE=${BUILDTYPE}"
  - sudo free -m -t
  - ./.travis/run ../travis_custom/custom_build
after_failure: ./.travis/run after_failure
after_success:
  - ./.travis/run after_success
  #- export PYTHONPATH=$install_dir/lib/python2.7/site-packages
  #- coveralls-lcov -v -n $build_dir/coverage.info > coverage.json
  - export PYTHONPATH=$PYHTONPATH:/tmp/_ci/install/lib/python2.7/site-packages:/usr/lib/python2.7/dist-packages
  - coveralls-lcov -v -n /tmp/_ci/build/coverage.info > coverage.json
  - coverage2 run ./python/tests.py
  - coveralls --merge=coverage.json
