lcov
lcov copied to clipboard
Having trouble upgrading LCOV to v2.0 in gitHub CI/CD pipeline
In our SmartRedis project (https://github.com/CrayLabs/SmartRedis), we use LCOV as part of our CI/CD pipeline to track code coverage across a series of test cases. With LCOV version 1.12, this is working perfectly: we install LCOV locally in the gitHub runner and invoke it. With LCOV version 2.0, we've run into several difficulties, and would welcome your insight.
In the runner, we set up the perl environment to version 5.30 and install the dependencies as follows:
# Set up perl environment for LCOV
- uses: actions/checkout@v3
- name: Setup perl
uses: shogo82148/actions-setup-perl@v1
with:
perl-version: '5.30'
install-modules: Memory::Process
# Install additional perl Modules
- name: Add perl modules
run: |
sudo apt install libcapture-tiny-perl && \
sudo apt install libdatetime-perl && \
sudo apt install libdevel-cover-perl && \
sudo apt install libdigest-md5-perl && \
sudo apt install libfile-spec-perl && \
sudo apt install libjson-xs-perl && \
sudo apt install libtime-hires-perl
(Memory::Process
doesn't seem to have a corresponding library to apt install
so we had to install it this way.)
The actual LCOV installation is done via our Makefile and boils down to a git clone and make PREFIX=
pwd/install install
.
When we then run the test cases and go to process the coverage results with LCOV, we see errors such as the following:
geninfo: WARNING: /usr/include/c++/9/bits/deque.tcc:857: unexecuted block on non-branch line with non-zero hit count. Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
and
geninfo: WARNING: /home/runner/work/SmartRedis/SmartRedis/third-party/pybind/include/pybind11/cast.h:1480: unexecuted block on non-branch line with non-zero hit count. Use "geninfo --rc geninfo_unexecuted_blocks=1 to set count to zero.
(use "geninfo --ignore-errors gcov,gcov ..." to suppress this warning)
geninfo: ERROR: mismatched end line for PyInit_smartredisPy at /home/runner/work/SmartRedis/SmartRedis/src/python/bindings/bind.cpp:41: 221 -> 41
(use "geninfo --ignore-errors mismatch ..." to bypass this error)
(Again, we did not encounter any errors of this form with LCOV 1.12.)
Any insights as to what might be going wrong would be welcome and gratefully received! Please let us know if there is any more information we can provide.