language: generic
matrix:
  include:
    - os: linux
      env: COMPILER_NAME=gcc CXX=g++-6 CC=gcc-6
      addons:
        apt:
          packages:
            - g++-6
            - lib32stdc++6
          sources: &sources
            - llvm-toolchain-precise-3.8
            - ubuntu-toolchain-r-test
    - os: linux
      env: COMPILER_NAME=clang CXX=clang++-3.8 CC=clang-3.8
      addons:
        apt:
          packages:
            - clang-3.8
            - lib32stdc++6
          sources: *sources
script: 
 - mkdir -p $HOME/.local
 - curl -L http://www.cmake.org/files/v3.6/cmake-3.6.2-Linux-i386.tar.gz | tar -xz -C $HOME/.local --strip-components=1
 - export PKG_CONFIG_PATH=$HOME/.local/lib/pkgconfig:$PKG_CONFIG_PATH
 - export COVERALLS_SERVICE_NAME=travis-ci
 - export COVERALLS_REPO_TOKEN=xCegPB5lX9j1FkHCALWoL7Wcc4VQrEno1
 - mkdir build && cd build
 - cmake -D COVERALLS=ON -D CMAKE_BUILD_TYPE=Debug -D CMAKE_C_COMPILER=$CC -D CMAKE_CXX_COMPILER=$CXX ..
 - make
 - make coveralls
sudo: true
language: generic
matrix:
  include:
    - os: linux
      env: COMPILER_NAME=gcc CXX=g++-6 CC=gcc-6
      addons:
        apt:
          packages:
            - g++-6
            - lib32stdc++6
          sources: &sources
            - llvm-toolchain-precise-3.8
            - ubuntu-toolchain-r-test
    - os: linux
      env: COMPILER_NAME=clang CXX=clang++-3.8 CC=clang-3.8
      addons:
        apt:
          packages:
            - g++-6
            - clang-3.8
            - lib32stdc++6
          sources: *sources
install:
 - if [[ "$COMPILER_NAME" == gcc ]] ; then
   sudo update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-6 90;
   fi
script: 
 - mkdir -p $HOME/.local
 - curl -L http://www.cmake.org/files/v3.6/cmake-3.6.2-Linux-i386.tar.gz | tar -xz -C $HOME/.local --strip-components=1
 - export PKG_CONFIG_PATH=$HOME/.local/lib/pkgconfig:$PKG_CONFIG_PATH
 - export COVERALLS_SERVICE_NAME=travis-ci
 - export COVERALLS_REPO_TOKEN=xCegPB5lX9j1FkHCALWoL7Wcc4VQrEno1
 - mkdir build && cd build
 - cmake -D COVERALLS=ON -D CMAKE_BUILD_TYPE=Debug -D CMAKE_C_COMPILER=$CC -D CMAKE_CXX_COMPILER=$CXX ..
 - make
 - make coveralls
FIX Travis gcov on gcc6
FIX Travis gcov on gcc6

