From 321e6e74eca775399564e602b0ce216e5eec20f3 Mon Sep 17 00:00:00 2001 From: Ricardo Abreu Date: Tue, 6 Jan 2026 18:23:28 +0000 Subject: [PATCH 1/8] [ci] Use codecov action --- .github/workflows/test.yml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 23263e6..3c42613 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -91,13 +91,9 @@ jobs: - name: Codecov if: contains(matrix.extra_build_flags, 'coverage') + uses: codecov/codecov-action@v5 working-directory: ${{github.workspace}}/build - run: | - echo "Producing coverage reports..." - find . -name catch_tests.cpp.gcno -exec gcov -pb {} + - - echo "Finding relevant report..." - cov_report=$(find . -name "*scope_guard.hpp.gcov" -exec readlink -e {} +) - - echo "The report is ${cov_report}. Uploading to codecov..." - bash <(curl -s https://codecov.io/bash) -f $cov_report + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: . /**/*scope_guard.hpp.gcov + flags: unittests From 86f6cc2106f346cc9cb9bc957fd25cae495bcba2 Mon Sep 17 00:00:00 2001 From: Ricardo Abreu Date: Tue, 6 Jan 2026 18:31:49 +0000 Subject: [PATCH 2/8] [ci] Run CI on further PR events --- .github/workflows/test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3c42613..3e4a808 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,6 +3,7 @@ name: Test on: workflow_dispatch: pull_request: + types: [opened, synchronize, reopened, ready_for_review] push: branches: [ "main" ] @@ -92,8 +93,8 @@ jobs: - name: Codecov if: contains(matrix.extra_build_flags, 'coverage') uses: codecov/codecov-action@v5 - working-directory: ${{github.workspace}}/build with: token: ${{ secrets.CODECOV_TOKEN }} + directory: ${{github.workspace}}/build files: . /**/*scope_guard.hpp.gcov flags: unittests From 2469232ef9fe5ac5de4edcf7051594eb97cabc27 Mon Sep 17 00:00:00 2001 From: Ricardo Abreu Date: Tue, 6 Jan 2026 18:53:35 +0000 Subject: [PATCH 3/8] [ci] Add a test with clang-19 --- .github/workflows/test.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3e4a808..3ebfda9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -42,6 +42,9 @@ jobs: compiler: clang++-17 - os: ubuntu-24.04 compiler: clang++-18 + - os: ubuntu-24.04 + compiler: clang++-19 + install: clang-19 # GCC on macOS - os: macos-15 compiler: g++-13 From 6e79bbdcb76ca6b0087a6110daa88f00ca5f9d74 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 6 Jan 2026 19:08:25 +0000 Subject: [PATCH 4/8] Initial plan From 90bec37d1b229d8fb34ed5ee4fac1aae4625a099 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 6 Jan 2026 19:11:17 +0000 Subject: [PATCH 5/8] Add explicit gcov generation step before codecov upload Co-authored-by: ricab <6698114+ricab@users.noreply.github.com> --- .github/workflows/test.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3ebfda9..84e430a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -93,6 +93,11 @@ jobs: # but do run twice as many compilation tests as the number of # available threads + - name: Generate coverage reports + if: contains(matrix.extra_build_flags, 'coverage') + working-directory: ${{github.workspace}}/build + run: find . -name catch_tests.cpp.gcno -exec gcov -pb {} + + - name: Codecov if: contains(matrix.extra_build_flags, 'coverage') uses: codecov/codecov-action@v5 From 03fe80ffd25893bfc63c3345971a2558442f8fc4 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 6 Jan 2026 19:20:07 +0000 Subject: [PATCH 6/8] Fix gcov command to process all .gcno files correctly Co-authored-by: ricab <6698114+ricab@users.noreply.github.com> --- .github/workflows/test.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 84e430a..16aa54e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -96,7 +96,10 @@ jobs: - name: Generate coverage reports if: contains(matrix.extra_build_flags, 'coverage') working-directory: ${{github.workspace}}/build - run: find . -name catch_tests.cpp.gcno -exec gcov -pb {} + + run: | + for gcno_file in $(find . -name "*.gcno"); do + gcov -pb "$gcno_file" + done - name: Codecov if: contains(matrix.extra_build_flags, 'coverage') From 5bcce358a1b9990432936b13410266b611067623 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 6 Jan 2026 19:33:23 +0000 Subject: [PATCH 7/8] Fix gcov to only process project source files and ignore errors Co-authored-by: ricab <6698114+ricab@users.noreply.github.com> --- .github/workflows/test.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 16aa54e..a32e9eb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -97,8 +97,9 @@ jobs: if: contains(matrix.extra_build_flags, 'coverage') working-directory: ${{github.workspace}}/build run: | - for gcno_file in $(find . -name "*.gcno"); do - gcov -pb "$gcno_file" + # Only process project source files, not dependencies + find . -name "catch_tests.cpp.gcno" -o -name "compile_time_tests.cpp.gcno" | while read gcno_file; do + gcov -pb "$gcno_file" || true done - name: Codecov From c8867fe25a3fa4ce089b91f5574cac1b2cf65bf8 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 6 Jan 2026 19:45:25 +0000 Subject: [PATCH 8/8] Simplify gcov command: use pattern matching without error suppression Co-authored-by: ricab <6698114+ricab@users.noreply.github.com> --- .github/workflows/test.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a32e9eb..070850c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -97,10 +97,8 @@ jobs: if: contains(matrix.extra_build_flags, 'coverage') working-directory: ${{github.workspace}}/build run: | - # Only process project source files, not dependencies - find . -name "catch_tests.cpp.gcno" -o -name "compile_time_tests.cpp.gcno" | while read gcno_file; do - gcov -pb "$gcno_file" || true - done + # Process test files from project root, excluding dependencies + find . -maxdepth 2 -name "*tests.cpp.gcno" -exec gcov -pb {} + - name: Codecov if: contains(matrix.extra_build_flags, 'coverage')