README: add language table with source sizes to Features section #31
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: Coverage Report | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| jobs: | |
| coverage: | |
| name: Generate Coverage Report | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y gcc g++ lcov | |
| - name: Configure | |
| run: | | |
| cmake -B build \ | |
| -DENABLE_COVERAGE=ON \ | |
| -DBUILD_TESTS=ON | |
| - name: Build | |
| run: cmake --build build | |
| - name: Test | |
| run: ctest --test-dir build --output-on-failure | |
| - name: Generate coverage report | |
| run: | | |
| cd build | |
| lcov --capture --directory . --output-file lcov_raw.info \ | |
| --rc branch_coverage=1 \ | |
| --ignore-errors empty,empty,unused,unused | |
| lcov --remove lcov_raw.info \ | |
| "*/tests/*" "*/_deps/*" "/usr/*" \ | |
| --output-file lcov.info \ | |
| --rc branch_coverage=1 \ | |
| --ignore-errors empty,empty,unused,unused | |
| if [ -s lcov.info ]; then | |
| genhtml lcov.info --output-directory coverage --branch-coverage | |
| else | |
| mkdir -p coverage | |
| echo "<html><body><h1>No coverage data yet (stubs only)</h1></body></html>" > coverage/index.html | |
| fi | |
| - name: Upload coverage artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-report | |
| path: build/coverage/ | |