Skip to content

Commit

Permalink
fixed gcov version issue
Browse files Browse the repository at this point in the history
  • Loading branch information
pravirkr committed Apr 29, 2024
1 parent 3cf68b6 commit ca36b9c
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 82 deletions.
5 changes: 0 additions & 5 deletions .clangd

This file was deleted.

69 changes: 0 additions & 69 deletions .cmake-format

This file was deleted.

2 changes: 1 addition & 1 deletion codecov.yml → .github/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ coverage:
status:
project:
default:
target: 80%
target: 50%
threshold: 5%
if_ci_failed: error
11 changes: 4 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
matrix:
os: [ubuntu-latest]
build_type: [Debug]
compiler: [{cpp: g++-13, code-cov: true}, {cpp: clang++-15}]
compiler: [{cpp: g++-13, code-cov: true, gcov: gcov-13}, {cpp: clang++-15}]
steps:
- uses: actions/checkout@v4
- name: Set reusable strings
Expand All @@ -31,7 +31,6 @@ jobs:
-DCMAKE_CXX_COMPILER=${{ matrix.compiler.cpp }}
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-DBUILD_DOCS=OFF -DBUILD_PYTHON=OFF -DBUILD_TESTING=ON
-DUSE_CLANG_TIDY=ON
-DCODE_COVERAGE=${{ matrix.compiler.code-cov }}
- name: Build
Expand All @@ -40,23 +39,21 @@ jobs:
--config ${{ matrix.build_type }} -j 4
- name: Run unit tests
working-directory: ${{ steps.strings.outputs.build-output-dir }}
run: >
ctest --build-config ${{ matrix.build_type }} --output-on-failure
--test-dir ${{ steps.strings.outputs.build-output-dir }}/tests/cpp
- name: Prepare coverage report
if: ${{ matrix.build_type == 'Debug' && matrix.compiler.code-cov }}
working-directory: ${{ steps.strings.outputs.build-output-dir }}
run: |
pip install gcovr
gcovr -r .. --cobertura -o coverage.xml
pip install gcovr>=7.1
gcovr -r . --cobertura -o coverage.xml --gcov-executable=${{ matrix.compiler.gcov }}
- name: Upload coverage reports to Codecov
if: ${{ matrix.build_type == 'Debug' && matrix.compiler.code-cov }}
uses: codecov/codecov-action@v4
with:
file: ${{ steps.strings.outputs.build-output-dir }}/coverage.xml
file: coverage.xml
name: codecov-umbrella
fail_ci_if_error: true
env:
Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ exclude_lines = ['raise AssertionError', 'raise NotImplementedError']
[tool.coverage.path]
source = "src/dmt"

[tool.gcovr]
filter = ["lib/*"]

[tool.mypy]
ignore_missing_imports = true
plugins = ["numpy.typing.mypy_plugin"]

0 comments on commit ca36b9c

Please sign in to comment.