ci/cd: Update build matrix #34
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: tests | |
on: | |
push: | |
branches: [ main ] | |
paths-ignore: | |
- '**/*.md' | |
pull_request: | |
types: [ opened, synchronize, reopened, edited ] | |
jobs: | |
build-coverage: | |
runs-on: ubuntu-latest | |
container: gcc:${{ matrix.tag }} | |
strategy: | |
fail-fast: false | |
matrix: | |
tag: [ 13, 14 ] | |
config: [default-deferred, default-realtime] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install dependencies | |
run: sudo apt update && sudo apt install cmake ninja-build -y | |
- name: Install gcovr | |
run: sudo pip install gcovr | |
- name: Run tests with coverage options | |
run: | | |
cmake --preset ${{ matrix.config }} | |
ctest --build-and-test . cmake-build-${{ matrix.config }} --build-generator "Ninja" --test-command ctest -V | |
cmake --build --preset ${{ matrix.config }} --target coverage | |
- name: Upload results to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
files: cmake-build-default-deferred/coverage.info, cmake-build-default-realtime/coverage.info | |
disable_search: true | |
token: ${{ secrets.CODECOV_TOKEN }} |