Upload coverage #7
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: Build and Test | |
| on: [push, pull_request] | |
| jobs: | |
| build-and-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Add LLVM APT repository | |
| run: | | |
| wget https://apt.llvm.org/llvm.sh | |
| chmod +x llvm.sh | |
| sudo ./llvm.sh 22 | |
| sudo apt-get update | |
| - uses: awalsh128/cache-apt-pkgs-action@latest | |
| name: Install build tools | |
| with: | |
| packages: clang-22 clang-format-22 clang-tidy-22 python3-pip lcov | |
| - uses: actions/setup-python@v1 | |
| - name: Install gcovr | |
| run: | | |
| python3 -m pip install gcovr==8.4 | |
| - uses: BSFishy/meson-build@v1.0.3 | |
| name: Run tests with coverage | |
| with: | |
| action: test | |
| setup-options: -Db_coverage=true -Dtests=enabled | |
| meson-version: '1.10.0' | |
| gcovr-version: '8.4' | |
| directory: builddir | |
| - name: Generate coverage report | |
| run: | | |
| ninja -C builddir coverage | |
| - uses: actions/upload-artifact@v6 | |
| name: Upload coverage report | |
| with: | |
| name: coverage-report | |
| path: builddir/meson-logs/coveragereport | |
| overwrite: true |