Skip to content

Format code

Format code #111

Workflow file for this run

name: Coverage
on:
push:
branches:
- main
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
jobs:
linux-gcc:
name: Linux GCC
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive
lfs: true
- name: Install dependencies
run: >
sudo apt update &&
sudo apt install
ninja-build
gcovr
- name: CMake configure
shell: bash
run: cmake -S . -B build -G Ninja -D CMAKE_BUILD_TYPE=Debug -D CMAKE_CXX_FLAGS="--coverage"
- name: CMake build
shell: bash
run: cmake --build build
- name: CTest
shell: bash
run: ctest --test-dir build -C Debug --output-on-failure -j 3
- name: Coverage report
shell: bash
run: >
gcovr
--xml-pretty
-e ".*_test\.cpp"
--exclude-unreachable-branches
--exclude-throw-branches
-r lib
-s build
-o build/coverage.xml
- name: Upload coverage report
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./build/coverage.xml
fail_ci_if_error: true