Skip to content

v0.1.7

v0.1.7 #155

name: Build and Test
on: [push]
env:
CMAKE_BUILD_TYPE: Debug
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, macos-latest, ubuntu-latest]
steps:
- uses: actions/checkout@v2
- name: Get required GCC version
if: matrix.os == 'ubuntu-latest'
shell: bash
run: sudo apt install gcc-9 g++-9
- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/build
- name: Configure CMake Using Default Compiler
if: matrix.os != 'ubuntu-latest'
shell: bash
working-directory: ${{github.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -DENABLE_SANITIZERS:BOOL=YES
- name: Configure CMake Using GCC
if: matrix.os == 'ubuntu-latest'
shell: bash
working-directory: ${{github.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -DENABLE_SANITIZERS:BOOL=YES
env:
CC: gcc-9
CXX: g++-9
- name: Build
working-directory: ${{github.workspace}}/build
shell: bash
run: cmake --build . --config $CMAKE_BUILD_TYPE --target tests
- name: Test
working-directory: ${{github.workspace}}/build
shell: bash
run: ctest -C $CMAKE_BUILD_TYPE --output-on-failure