From 72d1544dc2c87e6971884df508665741b721ac15 Mon Sep 17 00:00:00 2001 From: Alexey Sokolov Date: Sat, 30 Sep 2023 12:02:01 +0100 Subject: [PATCH] Use llvm-cov in macos CI --- .github/build.sh | 3 +++ .github/workflows/build.yml | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/.github/build.sh b/.github/build.sh index 3a277a6b..527e9196 100644 --- a/.github/build.sh +++ b/.github/build.sh @@ -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 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7f6fb252..7bd10638 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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: