Workflow file for this run
This file contains hidden or 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: Code Coverage | |
| jobs: | |
| coverage: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y lcov | |
| - name: Configure CMake | |
| run: | | |
| cmake -B build \ | |
| -DGMGPOLAR_BUILD_TESTS=ON \ | |
| -DGMGPOLAR_ENABLE_COVERAGE=ON \ | |
| -DCMAKE_BUILD_TYPE=Debug | |
| - name: Build and Generate Coverage | |
| run: | | |
| cmake --build build --parallel $(nproc) | |
| cmake --build build --target coverage | |
| - name: Upload Coverage Report | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-report | |
| path: build/coverage-report | |
| # Optional: Upload to Codecov | |
| - name: Upload to Codecov | |
| uses: codecov/codecov-action@v3 | |
| with: | |
| files: build/coverage-filtered.info | |
| fail_ci_if_error: false |