Skip to content

Update listener classes and member functions in smart_type.hpp and sm… #288

Update listener classes and member functions in smart_type.hpp and sm…

Update listener classes and member functions in smart_type.hpp and sm… #288

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]
#temporal_network: [LA, DL]
#heuristic_type: [h_max, h_add]
#deferrable_flaws: [ON, OFF]
#graph_pruning: [ON, OFF]
graph_refining: [ON, OFF]
#check_inconsistencies: [ON, OFF]
#build_listeners: [ON, OFF]
env:
BUILD_TYPE: ${{ matrix.build_type }}
#TEMPORAL_NETWORK_TYPE: ${{ matrix.temporal_network }}
#HEURISTIC_TYPE: ${{ matrix.heuristic_type }}
#DEFERRABLE_FLAWS: ${{ matrix.deferrable_flaws }}
#GRAPH_PRUNING: ${{ matrix.graph_pruning }}
GRAPH_REFINING: ${{ matrix.graph_refining }}
#CHECK_INCONSISTENCIES: ${{ matrix.check_inconsistencies }}
#BUILD_LISTENERS: ${{ matrix.build_listeners }}
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 -DGRAPH_REFINING=${{env.GRAPH_REFINING}} #-DTEMPORAL_NETWORK_TYPE=${{env.TEMPORAL_NETWORK_TYPE}} -DHEURISTIC_TYPE=${{env.HEURISTIC_TYPE}} -DDEFERRABLE_FLAWS=${{env.DEFERRABLE_FLAWS}} -DGRAPH_PRUNING=${{env.GRAPH_PRUNING}} -DCHECK_INCONSISTENCIES=${{env.CHECK_INCONSISTENCIES}} -DBUILD_LISTENERS=${{env.BUILD_LISTENERS}}
- name: Configure CMake
if: matrix.build_type == 'Release'
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Release -DGRAPH_REFINING=${{env.GRAPH_REFINING}} #-DTEMPORAL_NETWORK_TYPE=${{env.TEMPORAL_NETWORK_TYPE}} -DHEURISTIC_TYPE=${{env.HEURISTIC_TYPE}} -DDEFERRABLE_FLAWS=${{env.DEFERRABLE_FLAWS}} -DGRAPH_PRUNING=${{env.GRAPH_PRUNING}} -DCHECK_INCONSISTENCIES=${{env.CHECK_INCONSISTENCIES}} -DBUILD_LISTENERS=${{env.BUILD_LISTENERS}}
- 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