Skip to content

Commit f13cdd0

Browse files
committed
ci: fix coverage generation
1 parent b123de2 commit f13cdd0

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

.github/workflows/coverage.yml

+13-1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,15 @@ jobs:
4040
run: |
4141
sudo apt-get install -y lcov
4242
43+
- name: Install lcov 2.3 (which fixes function coverage calculation, https://bugs.launchpad.net/ubuntu/+source/lcov/+bug/2052354)
44+
if: runner.os == 'Linux'
45+
run: |
46+
echo -e "Package: *\nPin: release n=plucky\nPin-Priority: 100" | sudo tee /etc/apt/preferences.d/99-plucky
47+
echo "deb http://azure.archive.ubuntu.com/ubuntu/ plucky main universe" | sudo tee /etc/apt/sources.list.d/ubuntu-plucky.list
48+
sudo apt-get update
49+
sudo apt-get install -y -t plucky lcov
50+
apt-cache policy lcov
51+
4352
- name: "CMake Configure for Unix with vcpkg dependencies"
4453
env:
4554
CFLAGS: "--coverage"
@@ -55,7 +64,10 @@ jobs:
5564
working-directory: "${{ github.workspace }}/_build"
5665

5766
- name: Run lcov
58-
run: lcov --capture --directory "${{ github.workspace }}/_build" --output-file coverage.info --no-external --directory "${{ github.workspace }}" --exclude '*/tests/*'
67+
run: lcov --capture --directory "${{ github.workspace }}" --output-file coverage.info --no-external --exclude '*/tests/*'
68+
69+
- name: Dump lcov
70+
run: lcov --list coverage.info
5971

6072
- name: Coveralls
6173
uses: coverallsapp/github-action@v2

0 commit comments

Comments
 (0)