# YAML definition for travis-ci.com continuous integration.
# See https://docs.travis-ci.com/user/languages/c

language: c

compiler:
    - gcc

before_script:
    - mkdir build
    - cd build
    - CFLAGS='-g -O0 --coverage' cmake -G 'Unix Makefiles' ..

script:
    - make

after_success:
    - ../scripts/run-tests.sh
    - bash <(curl -s https://codecov.io/bash)

# YAML definition for travis-ci.com continuous integration.
# See https://docs.travis-ci.com/user/languages/c

language: c

compiler:
    - gcc

addons:
    apt:
        packages:
            - lcov

before_script:
    - mkdir build
    - cd build
    - CFLAGS='-g -O0 --coverage' cmake -G 'Unix Makefiles' ..

script:
    - make

after_success:
    - ../scripts/run-tests.sh
    # Creating report
    - cd ${TRAVIS_BUILD_DIR}
    - lcov --directory . --capture --output-file coverage.info # capture coverage info
    - lcov --remove coverage.info '/usr/*' --output-file coverage.info # filter out system
    - lcov --list coverage.info # debug info
    # Uploading report to CodeCov
    - bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports"

Create code coverage report by lcov.
Create code coverage report by lcov.
