Infrastructure Improvements #9
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: CI and Code Coverage | |
on: | |
push: | |
branches: | |
- main | |
- dev | |
pull_request: | |
branches: | |
- main | |
- dev | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Install Meson and Ninja | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y python3-pip python3-setuptools ninja-build build-essential lcov | |
pip3 install meson gcovr | |
- name: Install Dependencies | |
run: | | |
sudo apt-get install -y pkg-config libncurses-dev | |
- name: Configure Build | |
run: | | |
meson setup build --buildtype debugoptimized -Db_coverage=true | |
# Enable code coverage | |
- name: Build and Test | |
run: | | |
meson compile -C build | |
meson test -C build | |
- name: Generate Code Coverage Reports | |
run: | | |
ninja coverage-xml -C build | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v5 | |
if: success() | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: ./build/meson-logs/coverage.xml | |
fail_ci_if_error: true |