Disable gcovr call. #47
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: Run tests | |
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 | |
ls -laF | |
ls -laF ${{github.workspace}}/coverage.xml | |
# Could not make Codecov action v4.5 working properly as it was reporting also tests dir. Workaround. | |
- name: Remove not needed files | |
run: | | |
rm -rf ${{github.workspace}}/build/_deps | |
rm -rf ${{github.workspace}}/build/test | |
- name: Upload coverage reports to Codecov | |
uses: codecov/[email protected] | |
with: | |
# file: ${{github.workspace}}/coverage.xml | |
token: ${{ secrets.CODECOV_TOKEN }} |