Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 14 additions & 12 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,6 @@ jobs:
matrix:
include:
# Ubuntu Arm Jobs
- name: ubu22-arm-gcc12-clang-repl-20-coverage
os: ubuntu-22.04-arm
compiler: gcc-12
clang-runtime: '20'
cling: Off
cppyy: Off
llvm_enable_projects: "clang"
llvm_targets_to_build: "host;NVPTX"
coverage: true
- name: ubu24-arm-gcc12-clang-repl-20
os: ubuntu-24.04-arm
compiler: gcc-12
Expand Down Expand Up @@ -66,6 +57,15 @@ jobs:
llvm_enable_projects: "clang"
llvm_targets_to_build: "host;NVPTX"
# Ubuntu X86 Jobs
- name: ubu24-x86-gcc12-clang-repl-20-coverage
os: ubuntu-24.04
compiler: gcc-12
clang-runtime: '20'
cling: Off
cppyy: Off
llvm_enable_projects: "clang"
llvm_targets_to_build: "host;NVPTX"
coverage: true
- name: ubu24-x86-gcc12-clang-repl-20
os: ubuntu-24.04
compiler: gcc-12
Expand Down Expand Up @@ -261,10 +261,13 @@ jobs:
# Create lcov report
# capture coverage info
vers="${CC#*-}"
lcov --directory build/ --capture --output-file coverage.info --gcov-tool /usr/bin/gcov-${vers}
lcov --remove coverage.info '/usr/*' "${HOME}"'/.cache/*' ${{ github.workspace }}'/llvm-project/*' ${{ github.workspace }}'/unittests/*' --output-file coverage.info
lcov --directory build/ --capture --output-file coverage.info --gcov-tool /usr/bin/gcov-${vers} --ignore-errors mismatch
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we have --ignore-errors mismatch flag?
The lcov --remove is fine.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without these changes the ci crashes when you upgrade, since you get a newer lcov version is more restrictive in what it will allow you to get away with. All the changes here were found to be necessary.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at the docs https://manpages.debian.org/unstable/lcov/lcov.1.en.html#mismatch:
I feel we should try and avoid it. Do we have a CI run without that flag?

Copy link
Collaborator Author

@mcbarton mcbarton Oct 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoiding this flag would mean dealing with all the mismatch warnings we currently have in the ci now (see https://github.com/compiler-research/CppInterOp/actions/runs/18694188958/job/53307234747?pr=735#step:13:52). If you see all the warnings they are in the test files, and to me dealing with them doesn't feel like it gives any benefit given they aren't effecting the end result, and they can easily be ignored with a flag which lcov itself suggested.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That run still passes. Just gives you a few warnings. I believe that is fine. We should try and fix those warnings instead of ignoring them. Will approve it if you can remove --ignore-errors flag. We can fix the warnings later.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That run passes in the link I gave above because --ignore-errors mismatch is there 😅 . It will error without that flag. We cannot fix them later. If we remove that flag then they would need to be fixed in this PR.

Copy link
Collaborator Author

@mcbarton mcbarton Oct 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without that flag is treats all those warnings as errors. --ignore-errors mismatch is literally telling lcov to not treat the mismatches as errors, but warnings instead.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm. Ok.

lcov --remove coverage.info '/usr/*' ${{ github.workspace }}'/llvm-project/*' --ignore-errors unused --output-file coverage.info
lcov --remove coverage.info '${{ github.workspace }}/unittests/*' --ignore-errors unused --output-file coverage.info
lcov --remove coverage.info '${{ github.workspace }}/build/*' --ignore-errors unused --output-file coverage.info
# output coverage data for debugging (optional)
lcov --list coverage.info
rm -rf ./build/
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a bit of a fudge but without it codecov will ignore the coverage report the ci makes, and makes its own (which will include the unittests folder in the coverage report)


- name: Upload to codecov.io
if: ${{ success() && (matrix.coverage == true) }}
Expand All @@ -289,4 +292,3 @@ jobs:
uses: mxschmitt/action-tmate@v3
# When debugging increase to a suitable value!
timeout-minutes: 30

Loading