Add clang coverage to CI
@@ -6,7 +6,7 @@ commands:
- run: sudo apt-get update
- run: sudo apt-get install -y cmake "${TOOLCHAIN_PACKAGE}"
- run: sudo apt install libcmocka-dev
- build-test:
+ build:
steps:
- run: >
cmake -DWITH_TESTS=ON \
@@ -15,7 +15,9 @@ commands:
-DSANITIZE=OFF \
-DCOVERAGE="${CMAKE_COVERAGE:='OFF'}" \
.
- - run: make VERBOSE=1
+ - run: make -j 16 VERBOSE=1
+ test:
+ steps:
- run: ctest -VV
orbs:
@@ -55,7 +57,7 @@ jobs:
- checkout
- linux-setup
- run: sudo apt-get install -y valgrind
- - build-test
+ - build
- run: ctest -T Coverage
- codecov/upload
- run: ctest --output-on-failure -T memcheck | tee memcheck.out
@@ -74,7 +76,24 @@ jobs:
steps:
- checkout
- linux-setup
- - build-test
+ - build
+ - test
+
+
+ llvm-coverage:
+ machine:
+ image: ubuntu-2204:2022.10.2
+ environment:
+ TOOLCHAIN_PACKAGE: clang
+ CC: clang
+ CXX: clang++
+ CMAKE_COVERAGE: ON
+ steps:
+ - checkout
+ - linux-setup
+ - build
+ - run: make llvm-coverage
+
build-and-test-arm:
machine:
@@ -85,7 +104,8 @@ jobs:
steps:
- checkout
- linux-setup
- - build-test
+ - build
+ - test
build-bazel:
machine:
@@ -113,7 +133,8 @@ jobs:
- checkout
- run: bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- run: brew install cmocka cmake
- - build-test
+ - build
+ - test
workflows:
build-and-test:
@@ -122,11 +143,12 @@ workflows:
- build-and-test
- build-and-test-clang
- build-and-test-arm
+ - build-bazel
+ - llvm-coverage
+ # OSX builds are expensive, run only on master
- build-and-test-osx:
requires:
- build-and-test
filters:
branches:
- only:
- - master
- - build-bazel
+ only: [master]
