Skip to content

Commit 1866abc

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 1866abc

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

.github/workflows/linux.yaml

+13-6
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')
@@ -94,10 +94,17 @@ jobs:
9494
- name: Coverage
9595
if: ${{ !contains(matrix.os, 'redhat') }}
9696
run: |
97-
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
97+
mkdir -p "$HOME/.local/bin"
98+
if [ "${{ matrix.compiler }}" = 'clang' ]
99+
then
100+
printf '#!/bin/sh\nllvm-cov gcov "$@"\n' > $HOME/.local/bin/cov.sh
101+
else
102+
printf '#!/bin/sh\ngcov "$@"\n' > $HOME/.local/bin/cov.sh
103+
fi
104+
chmod +x $HOME/.local/bin/cov.sh
105+
export PATH="$HOME/.local/bin:$PATH"
106+
cd build
107+
find .. -name '*.gcda' -o -name '*.gcno' | xargs cov.sh --branch-probabilities --function-summaries --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 \
@@ -106,4 +113,4 @@ jobs:
106113
sqop verify codecov.SHA256SUM.sig pgp_keys.asc < codecov.SHA256SUM
107114
sha256sum --check codecov.SHA256SUM
108115
chmod +x codecov
109-
./codecov
116+
./codecov --gcov --gcovExecutable cov.sh

0 commit comments

Comments
 (0)