Skip to content

Disable search for Codecov. #25

Disable search for Codecov.

Disable search for Codecov. #25

name: Build & test on Linux
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
BUILD_TYPE: Release
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Dependencies
run: sudo apt install gcovr
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCODE_COVERAGE=ON
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Test
working-directory: ${{github.workspace}}/build
run: ctest -C ${{env.BUILD_TYPE}} -E 'Benchmark'
- name: Generate coverage xml
run: gcovr -f ${{github.workspace}}/src -xml-pretty > coverage.xml
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.0.1
with:
file: ${{github.workspace}}/coverage.xml
directory: ${{github.workspace}}/src
disable_search: yes
token: ${{ secrets.CODECOV_TOKEN }}