Skip to content

Get CI healthy on all three platforms ✅ #43

Get CI healthy on all three platforms ✅

Get CI healthy on all three platforms ✅ #43

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
jobs:
base:
name: ${{ matrix.platform }} with OpenMP ${{ matrix.openmp }}
runs-on: ${{ matrix.platform }}
defaults:
run:
shell: bash -l {0}
strategy:
fail-fast: true
matrix:
platform: ['ubuntu-latest', 'macos-14', 'windows-latest']
openmp: ['ON','OFF']
exclude:
- platform: 'macos-14'
openmp: 'ON'
- platform: 'windows-latest'
openmp: 'ON'
env:
PLATFORM: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
- uses: ilammy/msvc-dev-cmd@v1
if: matrix.platform == 'windows-latest'
- uses: mamba-org/setup-micromamba@v1
with:
init-shell: bash
environment-file: scripts/${{ matrix.platform }}-environment.yml
environment-name: "fgt-build"
cache-downloads: true
- name: CMake
shell: bash -l {0}
run: |
mkdir build
cd build
cmake .. \
-G Ninja \
-DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX \
-DWITH_TESTS=ON \
-DCMAKE_BUILD_TYPE=Release \
-DWITH_OPENMP=${{ matrix.openmp }} \
-DBUILD_SHARED_LIBS=ON
- name: Build
shell: bash -l {0}
working-directory: ./build
run: ninja
- name: Paths
shell: bash -l {0}
if: matrix.openmp == 'ON'
run: echo "OMP_NUM_THREADS=4" >> $GITHUB_ENV
- name: Test
shell: bash -l {0}
working-directory: ./build
run: ctest