test lcov #72
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Codecov | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
compiler: [ gcc ] | |
BUILD_TYPE : [ Debug ] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: dependencies | |
run: sudo apt install libeigen3-dev lcov | |
- name: configure | |
env: | |
CC: ${{ matrix.compiler }} | |
run: cmake -H. -Bbuild -DBUILD_TESTS=ON -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} -DENABLE_COVERAGE_BUILD=ON | |
- name: make | |
run: cmake --build build -- -j4 | |
- name: test | |
run: cd build && ctest | |
- name: Generate coverage data | |
run: lcov --directory . --capture --output-file coverage.info | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 |