From 1ef369a0605d804983621c961a4755a52a6ddca6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Feb 2024 04:11:13 +0000 Subject: [PATCH 01/17] 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](https://github.com/codecov/codecov-action/compare/v3...v4) --- updated-dependencies: - dependency-name: codecov/codecov-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8edfc8e..56f8536 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -74,7 +74,7 @@ jobs: - name: Upload Coverage to Codecov if: contains(matrix.os, 'ubuntu') - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: gcov: true gcov_include: include/* From 9331db66fe1cb5c033896470a0975b524d7b9b62 Mon Sep 17 00:00:00 2001 From: Adam Lugowski Date: Tue, 6 Feb 2024 21:17:12 -0800 Subject: [PATCH 02/17] Update tests.yml --- .github/workflows/tests.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 56f8536..e6a7114 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -76,5 +76,7 @@ jobs: if: contains(matrix.os, 'ubuntu') uses: codecov/codecov-action@v4 with: - gcov: true - gcov_include: include/* + fail_ci_if_error: true + verbose: true + token: ${{ secrets.CODECOV_TOKEN }} + directory: ./include From 4a74f809e34210c5d61dfcf272974503ece0b851 Mon Sep 17 00:00:00 2001 From: Adam Lugowski Date: Tue, 6 Feb 2024 21:40:00 -0800 Subject: [PATCH 03/17] Update tests.yml --- .github/workflows/tests.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e6a7114..8a427a5 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -79,4 +79,3 @@ jobs: fail_ci_if_error: true verbose: true token: ${{ secrets.CODECOV_TOKEN }} - directory: ./include From e9729d81301c360274c216fa9030fc611dbcab2d Mon Sep 17 00:00:00 2001 From: Adam Lugowski Date: Tue, 6 Feb 2024 23:02:07 -0800 Subject: [PATCH 04/17] Update tests.yml --- .github/workflows/tests.yml | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8a427a5..6635e3d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -17,12 +17,14 @@ jobs: llvm-version: "5" description: "LLVM 5" cppstd: "11 14 17" + gcov_executable: "llvm-cov gcov" - os: ubuntu-20.04 # oldest GCC that the setup-gcc action is able to install gcc-version: "7" description: "GCC 7" cppstd: "11 14" + gcov_executable: "gcov" - os: ubuntu-latest gcc-version: "13" @@ -32,10 +34,12 @@ jobs: - os: ubuntu-latest # default GCC, which has gcov cppstd: "11 14 17 20 23" + gcov_executable: "gcov" - os: macos-latest # uses Apple Clang cppstd: "11 14 17 20 23" + gcov_executable: "llvm-cov gcov" - os: windows-latest # uses MSVC @@ -59,6 +63,8 @@ jobs: - name: Build and Test run: | + pip install gcovr + for cppstd in ${{ matrix.cppstd }}; do echo "" echo "" @@ -68,12 +74,26 @@ 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: Create code coverage report (Windows) + if: runner.os == 'Windows' + working-directory: ./build/tests + run: | + choco install opencppcoverage + for cppstd in ${{ matrix.cppstd }}; do + cd build-cpp${cppstd}/tests + OpenCppCoverage.exe --export_type cobertura:coverage.xml --cover_children -- ctest -C Debug + cd ../.. + done + - name: Upload Coverage to Codecov - if: contains(matrix.os, 'ubuntu') + if: matrix.gcov_executable != '' || runner.os == 'Windows' uses: codecov/codecov-action@v4 with: fail_ci_if_error: true From d43fd1f4672270aa04970c24ee0e9a89be45c17d Mon Sep 17 00:00:00 2001 From: Adam Lugowski Date: Tue, 6 Feb 2024 23:12:55 -0800 Subject: [PATCH 05/17] drop gcc7 cov --- .github/workflows/tests.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 6635e3d..d2ec9a3 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -24,7 +24,6 @@ jobs: gcc-version: "7" description: "GCC 7" cppstd: "11 14" - gcov_executable: "gcov" - os: ubuntu-latest gcc-version: "13" From 09ca7f2f4ab2f414ff84dd140cf81217b022ee8d Mon Sep 17 00:00:00 2001 From: Adam Lugowski Date: Tue, 6 Feb 2024 23:15:48 -0800 Subject: [PATCH 06/17] Update codecov.yml --- codecov.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/codecov.yml b/codecov.yml index bc5b9f2..9045d5f 100644 --- a/codecov.yml +++ b/codecov.yml @@ -12,6 +12,9 @@ parsers: branch_detection: conditional: no loop: no + cobertura: + partials_as_hits: true + handle_missing_conditons: true ignore: - "tests" - "benchmark" From e858a9b5722eabeeedfddee617d106d334f1d406 Mon Sep 17 00:00:00 2001 From: Adam Lugowski Date: Tue, 6 Feb 2024 23:16:34 -0800 Subject: [PATCH 07/17] Update tests.yml --- .github/workflows/tests.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d2ec9a3..ae10a5b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -82,7 +82,6 @@ jobs: - name: Create code coverage report (Windows) if: runner.os == 'Windows' - working-directory: ./build/tests run: | choco install opencppcoverage for cppstd in ${{ matrix.cppstd }}; do From d4b8c455fae780243170ab2cff44fcd54d4776f9 Mon Sep 17 00:00:00 2001 From: Adam Lugowski Date: Tue, 6 Feb 2024 23:31:07 -0800 Subject: [PATCH 08/17] shell: bash --- .github/workflows/tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ae10a5b..c1015c8 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -89,6 +89,7 @@ jobs: OpenCppCoverage.exe --export_type cobertura:coverage.xml --cover_children -- ctest -C Debug cd ../.. done + shell: bash - name: Upload Coverage to Codecov if: matrix.gcov_executable != '' || runner.os == 'Windows' From 432c93ad02929cf6b123935bfcd8862413bb7f53 Mon Sep 17 00:00:00 2001 From: Adam Lugowski Date: Tue, 6 Feb 2024 23:57:40 -0800 Subject: [PATCH 09/17] Update tests.yml --- .github/workflows/tests.yml | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c1015c8..9b1987b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -60,6 +60,10 @@ jobs: version: ${{ matrix.llvm-version }} env: true + - name: Setup Windows + if: runner.os == 'Windows' + run: choco install opencppcoverage + - name: Build and Test run: | pip install gcovr @@ -76,17 +80,9 @@ jobs: 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: Create code coverage report (Windows) - if: runner.os == 'Windows' - run: | - choco install opencppcoverage - for cppstd in ${{ matrix.cppstd }}; do - cd build-cpp${cppstd}/tests - OpenCppCoverage.exe --export_type cobertura:coverage.xml --cover_children -- ctest -C Debug + if [ '${{ runner.os }}' -eq 'Windows' ]; then + OpenCppCoverage.exe --export_type cobertura:coverage.xml --cover_children -- ctest -C Debug + fi cd ../.. done shell: bash From 007e4b3e493a981df640b13e777b04fa29174a64 Mon Sep 17 00:00:00 2001 From: Adam Lugowski Date: Tue, 6 Feb 2024 23:57:57 -0800 Subject: [PATCH 10/17] Update codecov.yml --- codecov.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/codecov.yml b/codecov.yml index 9045d5f..e246205 100644 --- a/codecov.yml +++ b/codecov.yml @@ -14,7 +14,6 @@ parsers: loop: no cobertura: partials_as_hits: true - handle_missing_conditons: true ignore: - "tests" - "benchmark" From 17537ec3248ff747f97a1c9aa42b1c4bc18a5ad9 Mon Sep 17 00:00:00 2001 From: Adam Lugowski Date: Wed, 7 Feb 2024 00:16:24 -0800 Subject: [PATCH 11/17] Update tests.yml --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9b1987b..f4bee98 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -80,7 +80,7 @@ jobs: 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 - if [ '${{ runner.os }}' -eq 'Windows' ]; then + if [ '${{ runner.os }}' = 'Windows' ]; then OpenCppCoverage.exe --export_type cobertura:coverage.xml --cover_children -- ctest -C Debug fi cd ../.. From e89406dd8b849062796f8dc6bb9823ddbc5a00a4 Mon Sep 17 00:00:00 2001 From: Adam Lugowski Date: Wed, 7 Feb 2024 00:23:50 -0800 Subject: [PATCH 12/17] clang coverage --- tests/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index c49abb6..03e7ed0 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -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() From 96f6ee014a7f72502aaadfc9e2e0990109ac5746 Mon Sep 17 00:00:00 2001 From: Adam Lugowski Date: Wed, 7 Feb 2024 00:50:33 -0800 Subject: [PATCH 13/17] Update tests.yml --- .github/workflows/tests.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index f4bee98..60ac971 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -62,7 +62,10 @@ jobs: - name: Setup Windows if: runner.os == 'Windows' - run: choco install opencppcoverage + run: | + choco install --no-progress opencppcoverage + dir "C:\Program Files\OpenCppCoverage\" + Add-Content $env:GITHUB_PATH "C:\Program Files\OpenCppCoverage\bin" - name: Build and Test run: | From c4c0ed8ce6ed9b6eb111620ba956e9ea981ed0f8 Mon Sep 17 00:00:00 2001 From: Adam Lugowski Date: Wed, 7 Feb 2024 00:56:07 -0800 Subject: [PATCH 14/17] Update tests.yml --- .github/workflows/tests.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 60ac971..9bb542e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -38,7 +38,7 @@ jobs: - os: macos-latest # uses Apple Clang cppstd: "11 14 17 20 23" - gcov_executable: "llvm-cov gcov" + gcov_executable: "xcrun llvm-cov gcov" - os: windows-latest # uses MSVC @@ -64,8 +64,7 @@ jobs: if: runner.os == 'Windows' run: | choco install --no-progress opencppcoverage - dir "C:\Program Files\OpenCppCoverage\" - Add-Content $env:GITHUB_PATH "C:\Program Files\OpenCppCoverage\bin" + Add-Content $env:GITHUB_PATH "C:\Program Files\OpenCppCoverage" - name: Build and Test run: | From 5cdaf1a2c92702316fa82aabfcad7fa969bb6a8f Mon Sep 17 00:00:00 2001 From: Adam Lugowski Date: Wed, 7 Feb 2024 01:10:16 -0800 Subject: [PATCH 15/17] modules --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9bb542e..d582b09 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -83,7 +83,7 @@ jobs: 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 if [ '${{ runner.os }}' = 'Windows' ]; then - OpenCppCoverage.exe --export_type cobertura:coverage.xml --cover_children -- ctest -C Debug + OpenCppCoverage.exe --export_type cobertura:coverage.xml --cover_children --modules task-thread-pool -- ctest -C Debug fi cd ../.. done From 59f14cb67d4987a7c88c256f990bd43538c8810f Mon Sep 17 00:00:00 2001 From: Adam Lugowski Date: Wed, 7 Feb 2024 01:27:36 -0800 Subject: [PATCH 16/17] Update tests.yml --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d582b09..fe0148f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -82,7 +82,7 @@ jobs: 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 - if [ '${{ runner.os }}' = 'Windows' ]; then + if [ '${{ runner.os }}' = 'Windows' ] && [ "$cppstd" = '17' ]; then OpenCppCoverage.exe --export_type cobertura:coverage.xml --cover_children --modules task-thread-pool -- ctest -C Debug fi cd ../.. From 3231d6ef3971609b577d35875aa3d9350d391e77 Mon Sep 17 00:00:00 2001 From: Adam Lugowski Date: Wed, 7 Feb 2024 02:00:04 -0800 Subject: [PATCH 17/17] drop windows codecov --- .github/workflows/tests.yml | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index fe0148f..b650d0f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -38,7 +38,6 @@ jobs: - os: macos-latest # uses Apple Clang cppstd: "11 14 17 20 23" - gcov_executable: "xcrun llvm-cov gcov" - os: windows-latest # uses MSVC @@ -60,12 +59,6 @@ jobs: version: ${{ matrix.llvm-version }} env: true - - name: Setup Windows - if: runner.os == 'Windows' - run: | - choco install --no-progress opencppcoverage - Add-Content $env:GITHUB_PATH "C:\Program Files\OpenCppCoverage" - - name: Build and Test run: | pip install gcovr @@ -82,15 +75,12 @@ jobs: 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 - if [ '${{ runner.os }}' = 'Windows' ] && [ "$cppstd" = '17' ]; then - OpenCppCoverage.exe --export_type cobertura:coverage.xml --cover_children --modules task-thread-pool -- ctest -C Debug - fi cd ../.. done shell: bash - name: Upload Coverage to Codecov - if: matrix.gcov_executable != '' || runner.os == 'Windows' + if: matrix.gcov_executable != '' uses: codecov/codecov-action@v4 with: fail_ci_if_error: true