Skip to content

update example

update example #28

name: Build and Test (Linux/macOS/Windows)
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
# Allows running this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
strategy:
matrix:
os: ['ubuntu-latest', 'windows-latest', 'macos-latest']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Configure CMake (Linux)
run: cmake -B ${{github.workspace}}/build
if: matrix.os == 'ubuntu-latest'
- name: Configure CMake (Windows)
run: cmake -B ${{github.workspace}}/build
if: matrix.os == 'windows-latest'
- name: Configure CMake (macOS)
run: |
export OpenMP_ROOT=$(brew --prefix)/opt/libomp
cmake -B ${{github.workspace}}/build
if: matrix.os == 'macos-latest'
- name: Build
run: cmake --build ${{github.workspace}}/build -j
- name: Test
working-directory: ${{github.workspace}}/build
run: ctest