srctree

Robin Linden parent da767ceb 60ba5544
ci: Add a Clang 16 code coverage job

inlinesplit
.github/workflows/ci.yaml added: 22, removed: 2, total 20
@@ -112,6 +112,9 @@ jobs:
include:
- compiler: gcc
version: 13
- compiler: clang
version: 16
bazel: --config=clang16-coverage
steps:
- uses: actions/checkout@v4
with:
@@ -122,17 +125,34 @@ jobs:
key: coverage-${{ matrix.compiler }}-${{ matrix.version }}-${{ hashFiles('.bazelversion', 'WORKSPACE', 'third_party/**') }}
restore-keys: coverage-${{ matrix.compiler }}-${{ matrix.version }}-
- run: sudo add-apt-repository ppa:ubuntu-toolchain-r/test
if: startsWith(matrix.compiler, 'gcc')
- name: Install
if: startsWith(matrix.compiler, 'gcc')
run: |
sudo apt-get update
sudo apt-get install --no-install-recommends libgl-dev lcov gcc-${{ matrix.version }} g++-${{ matrix.version }}
- name: Setup
if: startsWith(matrix.compiler, 'gcc')
run: |
echo "CC=gcc-${{ matrix.version }}" >> $GITHUB_ENV
echo "CXX=g++-${{ matrix.version }}" >> $GITHUB_ENV
echo "GCOV=gcov-${{ matrix.version }}" >> $GITHUB_ENV
- name: Install
if: startsWith(matrix.compiler, 'clang')
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-${{ matrix.version }} main"
sudo apt-get update
sudo apt-get install --no-install-recommends libgl-dev lcov clang-${{ matrix.version }} libclang-rt-${{ matrix.version }}-dev llvm-${{ matrix.version }}
# See: https://github.com/actions/runner-images/issues/8659
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
- name: Setup
if: startsWith(matrix.compiler, 'clang')
run: echo "CC=clang-16" >> $GITHUB_ENV && echo "CXX=clang++-16" >> $GITHUB_ENV
- name: Coverage
run: bazel coverage ...
run: bazel coverage ... ${{ matrix.bazel }}
- name: Summary
run: lcov --summary bazel-out/_coverage/_coverage_report.dat
- name: Upload