Skip to content

Commit

Permalink
ci: Add a Clang 16 code coverage job
Browse files Browse the repository at this point in the history
  • Loading branch information
robinlinden committed Dec 13, 2023
1 parent 65d2d1c commit f621b02
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,39 @@ jobs:
- run: export PATH="/usr/local/opt/icu4c/bin:/usr/local/opt/icu4c/sbin:$PATH"; bazelisk build //...
- run: export PATH="/usr/local/opt/icu4c/bin:/usr/local/opt/icu4c/sbin:$PATH"; bazelisk test //...

linux-clang-coverage:
runs-on: ubuntu-22.04
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/cache@v3
with:
path: ~/.cache/bazel
key: clangcoverage-${{ hashFiles('.bazelversion', 'WORKSPACE', 'third_party/**') }}
restore-keys: clangcoverage-
- name: Install
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo apt-add-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main"
sudo apt-get update
sudo apt-get install --no-install-recommends libgl-dev lcov clang-16 libclang-rt-16-dev llvm-16
# See: https://github.com/actions/runner-images/issues/8659
- name: Work around libstdc++ and Clang incompabilities
run: |
sudo rm -f /etc/apt/sources.list.d/ubuntu-toolchain-r-ubuntu-test-jammy.list
sudo apt-get update
sudo apt-get install --allow-downgrades libstdc++6=12.3.0-1ubuntu1~22.04 libgcc-s1=12.3.0-1ubuntu1~22.04
- run: echo "CC=clang-16" >> $GITHUB_ENV && echo "CXX=clang++-16" >> $GITHUB_ENV
- run: bazel coverage ... --config clang16-coverage
- run: lcov --summary bazel-out/_coverage/_coverage_report.dat
- name: Upload
run: |
wget --no-verbose --output-document=codecov https://github.com/codecov/uploader/releases/download/v0.7.1/codecov-linux
chmod +x codecov
./codecov -f bazel-out/_coverage/_coverage_report.dat
windows-msvc:
runs-on: windows-2022
timeout-minutes: 40
Expand Down

0 comments on commit f621b02

Please sign in to comment.