Skip to content

Commit

Permalink
Bump codecov/codecov-action from 3 to 4 (#7)
Browse files Browse the repository at this point in the history
* Bump codecov/codecov-action from 3 to 4

Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3 to 4.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](codecov/codecov-action@v3...v4)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* Update tests.yml

* Update tests.yml

* Update tests.yml

* drop gcc7 cov

* Update codecov.yml

* Update tests.yml

* shell: bash

* Update tests.yml

* Update codecov.yml

* Update tests.yml

* clang coverage

* Update tests.yml

* Update tests.yml

* modules

* Update tests.yml

* drop windows codecov

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Adam Lugowski <[email protected]>
  • Loading branch information
dependabot[bot] and alugowski authored Jun 3, 2024
1 parent dd374d3 commit 3ff123c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
llvm-version: "7"
description: "LLVM 7"
cppstd: "11 14 17"
gcov_executable: "llvm-cov gcov"

- os: ubuntu-20.04
# oldest GCC that the setup-gcc action is able to install
Expand All @@ -32,6 +33,7 @@ jobs:
- os: ubuntu-latest
# default GCC, which has gcov
cppstd: "11 14 17 20 23"
gcov_executable: "gcov"

- os: macos-latest
# uses Apple Clang
Expand Down Expand Up @@ -59,6 +61,8 @@ jobs:

- name: Build and Test
run: |
pip install gcovr
for cppstd in ${{ matrix.cppstd }}; do
echo ""
echo ""
Expand All @@ -68,13 +72,17 @@ jobs:
cmake --build $BUILD --config Debug
cd $BUILD/tests
ctest -C Debug --output-on-failure --verbose
if [ -n '${{ matrix.gcov_executable }}' ]; then
gcovr --delete --root ../../ --print-summary --xml coverage.xml . --gcov-executable '${{ matrix.gcov_executable }}' --merge-mode-functions=separate --gcov-ignore-parse-errors=negative_hits.warn_once_per_file
fi
cd ../..
done
shell: bash

- name: Upload Coverage to Codecov
if: contains(matrix.os, 'ubuntu')
uses: codecov/codecov-action@v3
if: matrix.gcov_executable != ''
uses: codecov/codecov-action@v4
with:
gcov: true
gcov_include: include/*
fail_ci_if_error: true
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
2 changes: 2 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ parsers:
branch_detection:
conditional: no
loop: no
cobertura:
partials_as_hits: true
ignore:
- "tests"
- "benchmark"
5 changes: 4 additions & 1 deletion tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@ endif()
option(TASK_THREAD_POOL_TEST_COVERAGE "Code-coverage" OFF)
if(TASK_THREAD_POOL_TEST_COVERAGE)
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
add_compile_options("--coverage")
add_compile_options("-O0" "--coverage")
add_link_options("-lgcov" "--coverage")
elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
add_compile_options("-O0" "--coverage")
add_link_options("--coverage")
endif()
endif()

Expand Down

0 comments on commit 3ff123c

Please sign in to comment.