Skip to content

Update extern/utils subproject commit #238

Update extern/utils subproject commit

Update extern/utils subproject commit #238

Workflow file for this run

name: CMake
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
build_type: [Debug, Release]
env:
BUILD_TYPE: ${{ matrix.build_type }}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install dependencies
if: matrix.build_type == 'Debug' && matrix.os == 'ubuntu-latest'
run: sudo apt-get install -y lcov valgrind
- name: Configure CMake (Debug)
if: matrix.build_type == 'Debug'
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Debug -DENABLE_COVERAGE=ON
- name: Configure CMake
if: matrix.build_type == 'Release'
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Release
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Test with coverage and memory sanitizer
if: matrix.build_type == 'Debug' && matrix.os == 'ubuntu-latest'
working-directory: ${{github.workspace}}/build
run: ctest -C ${{env.BUILD_TYPE}} --rerun-failed --output-on-failure -T Test -T Coverage -T MemCheck
- name: Test without coverage and memory sanitizer
if: matrix.build_type == 'Release' || matrix.os != 'ubuntu-latest'
working-directory: ${{github.workspace}}/build
run: ctest -C ${{env.BUILD_TYPE}} --rerun-failed --output-on-failure -T Test
- name: Make coverage report
if: matrix.build_type == 'Debug' && matrix.os == 'ubuntu-latest'
run: |
lcov --capture --directory ${{github.workspace}}/build --output-file coverage.info
lcov --remove coverage.info '/usr/*' --output-file coverage.info
lcov --list coverage.info