Use llvm-cov in macos CI

This commit is contained in:
Alexey Sokolov
2023-09-30 12:02:01 +01:00
parent afe94158a7
commit 72d1544dc2
2 changed files with 7 additions and 0 deletions

3
.github/build.sh vendored
View File

@@ -43,6 +43,9 @@ case "${CC:-gcc}" in
lcov --list lcov-coverage.txt
;;
clang)
if [[ x$(uname) == xDarwin ]]; then
export PATH=$PATH:/Library/Developer/CommandLineTools/usr/bin
fi
llvm-profdata merge unittest.profraw -o unittest.profdata
llvm-profdata merge inttest.profraw -o inttest.profdata
llvm-cov show -show-line-counts-or-regions -instr-profile=unittest.profdata test/unittest_bin > unittest-cmake-coverage.txt

View File

@@ -103,6 +103,10 @@ jobs:
macos:
name: macOS
runs-on: macos-latest
env:
# This doesn't make big difference, since it's the same compiler, but we also use this variable to select lcov vs llvm-cov
CXX: clang++
CC: clang
steps:
- uses: actions/checkout@v3
with: