Skip to content

GitHub Workflows for CI/CD #3

GitHub Workflows for CI/CD

GitHub Workflows for CI/CD #3

Workflow file for this run

name: C++ Tests
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
BUILD_TYPE: Release
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-20.04, ubuntu-22.04]
steps:
- uses: actions/checkout@v3
with:
lfs: 'true'
- name: Install dependencies
run: sudo apt install -y gcovr libeigen3-dev libgtest-dev
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCOVERAGE=ON -DTESTS=ON -DTIDY=OFF
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Test
working-directory: ${{github.workspace}}/build
run: ctest -C ${{env.BUILD_TYPE}}
- name: Coverage summary
run: gcovr --print-summary