Skip to content

Commit 86bcf34

Browse files
committed
ci(linux): drop lcov usage
I haven't been able to make lcov 2.0 work for us, so let's just drop it and directly use gcov instead, since codecov supports it as well.
1 parent da7dd46 commit 86bcf34

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

.github/workflows/linux.yaml

+11-4
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
run: |
5858
if [ ${{ matrix.compiler }} = gcc ]; then compiler=g++; else compiler="clang lld ?exact-name(libclang-rt-dev)"; fi
5959
apt -y update
60-
apt -y install $compiler meson pkg-config cmake rapidjson-dev libssl-dev netbase '?exact-name(libhowardhinnant-date-dev)' '?exact-name(libgmock-dev) (?version([1-9]\.[1-9][1-9]) | ?version([1-9]\.[2-9][0-9]))' '?exact-name(libcpp-httplib-dev)' libcurl4-openssl-dev git ca-certificates curl sqop lcov llvm-dev --no-install-recommends
60+
apt -y install $compiler meson pkg-config cmake rapidjson-dev libssl-dev netbase '?exact-name(libhowardhinnant-date-dev)' '?exact-name(libgmock-dev) (?version([1-9]\.[1-9][1-9]) | ?version([1-9]\.[2-9][0-9]))' '?exact-name(libcpp-httplib-dev)' libcurl4-openssl-dev git ca-certificates curl sqop llvm-dev --no-install-recommends
6161
6262
- name: Install dependencies (Red Hat)
6363
if: contains(matrix.os, 'redhat')
@@ -95,9 +95,16 @@ jobs:
9595
if: ${{ !contains(matrix.os, 'redhat') }}
9696
run: |
9797
mkdir -p $HOME/.local/bin
98-
if [ "${{ matrix.compiler }}" = 'clang' ]; then printf 'llvm-cov gcov "$@"' > $HOME/.local/bin/cov.sh; else printf 'gcov "$@"' > $HOME/.local/bin/cov.sh; fi && chmod +x $HOME/.local/bin/cov.sh
99-
lcov --capture --output-file coverage.info --directory . --gcov-tool $HOME/.local/bin/cov.sh --exclude '/usr/*' --exclude "${HOME}"'/.cache/*' --exclude '*/tests/*' --exclude '*/subprojects/*'
100-
lcov --list coverage.info
98+
echo '#!/bin/sh' > $HOME/.local/bin/cov.sh
99+
if [ "${{ matrix.compiler }}" = 'clang' ]
100+
then
101+
echo 'llvm-cov gcov "$@"' >> $HOME/.local/bin/cov.sh
102+
else
103+
echo 'gcov "$@"' >> $HOME/.local/bin/cov.sh
104+
fi
105+
chmod +x $HOME/.local/bin/cov.sh
106+
cd build
107+
find .. -name '*.gcda' -o -name '*.gcno' | grep -v tests | xargs $HOME/.local/bin/cov.sh --branch-probabilities --preserve-paths --relative-only
101108
curl --remote-name-all \
102109
https://keybase.io/codecovsecurity/pgp_keys.asc \
103110
https://uploader.codecov.io/latest/linux/codecov \

0 commit comments

Comments
 (0)