language: cpp
sudo: required
compiler:
  - gcc
  - clang

services:
  - docker

install:
  # Pull Docker image
  - docker pull tatsy/ubuntu-cxx
  - docker build --tag=spica-env --quiet=true .

script:
  # Run test on Docker container
  - docker run --env="CC=$CC" --env="CXX=$CXX" spica-env /bin/bash -c "lcov --directory . --zerocounters && CTEST_OUTOUT_ON_FAILURE=TRUE make check && cat coverage.info" > coverage.info

after_success:
  # Send coverage report to Coveralls
  - if [ "$CXX" = "g++"     ]; then lcov --directory . --capture --output-file coverage.info; fi
  - if [ "$CXX" = "clang++" ]; then lcov --directory . --capture --output-file coverage.info --gcov-tool llvm-cov-${LLVM_VER}; fi
  - lcov --remove coverage.info '3rdparty/*' 'src/renderer/*' 'src/viewer/*' 'test/*' 'example/*' '/usr/*' 'CMakeFiles/*' --output-file coverage.info
  - lcov --list coverage.info
  - coveralls-lcov --repo-token RiYcPJSCbPZoogMd1PE10696EAqG8sl5q coverage.info

branches:
  only:
    - master
    - develop

notifications:
  email:
    recipients: tatsy.mail@gmail.com
    on_success: change
    on_failure: always

env:
  global:
    - LLVM_VER='3.7'

language: cpp
sudo: required
compiler:
  - gcc
  - clang

services:
  - docker

install:
  # Pull Docker image
  - docker pull tatsy/ubuntu-cxx
  - docker build --tag=spica-env --quiet=true .

script:
  # Run test on Docker container
  - docker run --env="CC=$CC" --env="CXX=$CXX" spica-env /bin/bash -c "lcov --directory . --zerocounters && CTEST_OUTOUT_ON_FAILURE=TRUE make check && if [ $CXX = \"g++\"     ]; then lcov --directory . --capture --output-file coverage.info; fi && if [ $CXX = \"clang++\" ]; then lcov --directory . --capture --output-file coverage.info --gcov-tool llvm-cov; fi && cat coverage.info" > coverage.info"

after_success:
  # Send coverage report to Coveralls
  - lcov --remove coverage.info '3rdparty/*' 'src/renderer/*' 'src/viewer/*' 'test/*' 'example/*' '/usr/*' 'CMakeFiles/*' --output-file coverage.info
  - lcov --list coverage.info
  - coveralls-lcov --repo-token RiYcPJSCbPZoogMd1PE10696EAqG8sl5q coverage.info

branches:
  only:
    - master
    - develop

notifications:
  email:
    recipients: tatsy.mail@gmail.com
    on_success: change
    on_failure: always

env:
  global:
    - LLVM_VER='3.7'

Fix the build error on Docker.
Fix the build error on Docker.
