Skip to content

Commit

Permalink
Add clang coverage to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
PJK committed Dec 27, 2022
1 parent 051a0be commit 783fe24
Showing 1 changed file with 31 additions and 9 deletions.
40 changes: 31 additions & 9 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -85,7 +104,8 @@ jobs:
steps:
- checkout
- linux-setup
- build-test
- build
- test

build-bazel:
machine:
Expand Down Expand Up @@ -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:
Expand All @@ -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]

0 comments on commit 783fe24

Please sign in to comment.