No description or website provided.
Switch branches/tags
Nothing to show
Clone or download
Latest commit 6fa0fee Apr 26, 2018

README.md

Codecov CI CMake g++ cpp11 lcov Example

Travis CI logo Codecov logo

Build Status codecov MIT License

The goal of this project is to build project with following tools:

  • C++ version: C++11
  • Build system: CMake
  • C++ compiler: g++
  • Libraries: STL only
  • Code coverage: lcov (note: it should show the code coverage is below 100%)
  • CodeCov (code coverage is measured by CodeCov).
  • Source: multiple files

Special Thanks

Goes to Richel Bilderbeek for inspiration and all work on Travis CI tutorials. Here is link to the same project with structure (except no lcov) and here is list of all his projects if you want make build with travis but with different configuration.

Prerequisites

To build the project you need to install CMake. Here are the instructions. To create code coverage report you need to install lcov. Download lcov from here you can download latest lcov and here are instructions. This reports will be later uploaded to CodeCov servers.

Guide

Travis Setup

Add to your .travis.yml file.

language: cpp
compiler:
- g++
after_success:
    # 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"

Produce Coverage Reports

lcov

Gather reports:

lcov --directory . --capture --output-file coverage.info

Caveats

Private Repos

Add to your .travis.yml file.

after_success:
  - bash <(curl -s https://codecov.io/bash) -t uuid-repo-token

Authors

License

This project is licensed under the MIT License - see the LICENSE file for details.

  1. More documentation at https://docs.codecov.io
  2. Configure codecov through the codecov.yml https://docs.codecov.io/docs/codecov-yaml

We are happy to help if you have any questions. Please contact email our Support at support@codecov.io