]> jfr.im git - irc/znc/znc.git/commitdiff
Use llvm-cov in macos CI
authorAlexey Sokolov <redacted>
Sat, 30 Sep 2023 11:02:01 +0000 (12:02 +0100)
committerAlexey Sokolov <redacted>
Sat, 30 Sep 2023 13:13:33 +0000 (14:13 +0100)
.github/build.sh
.github/workflows/build.yml

index 3a277a6b0a4e655abf2c43380c389d392a0cba8a..527e9196b17c4ffef5198b898cae42a0ffeee751 100644 (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
index 7f6fb252281ce393e49bf079572cfab2fc874cf7..7bd10638e7a2d8a23abc01fb0bdab720e5703032 100644 (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: