Skip to content

Commit bf96bf9

Browse files
author
Sebastian Degenaar
committed
ci: fix lcov 2.0+ empty function coverage error on macOS runners
1 parent 3d97b3a commit bf96bf9

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,16 @@ jobs:
7575
fi
7676
7777
# Strip GPU renderer paths that are physically untestable in a headless VM.
78+
# lcov 2.0+ requires explicitly ignoring "empty" function coverage errors.
79+
if lcov --version | grep -q 'lcov: LCOV version 2'; then
80+
IGNORE_FLAGS="--ignore-errors unused,empty"
81+
else
82+
IGNORE_FLAGS="--ignore-errors unused"
83+
fi
84+
7885
lcov --remove coverage/lcov.info \
7986
'lib/src/renderer/*' \
80-
--ignore-errors unused \
87+
$IGNORE_FLAGS \
8188
-o coverage/lcov_effective.info
8289
8390
TOTAL=$(lcov --summary coverage/lcov_effective.info 2>&1 \

0 commit comments

Comments
 (0)