Mathematica model implementation #543
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SPDX-FileCopyrightText: 2021 Philipp Basler, Margarete Mühlleitner and Jonas Müller | |
# | |
# SPDX-License-Identifier: GPL-3.0-or-later | |
name: Unit tests | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
- develop | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
tests-fullSetup: | |
strategy: | |
matrix: | |
setup: [ {os: ubuntu-latest}, {os: windows-latest}, {os: macos-latest}, {os: ubuntu-20.04}] | |
runs-on: ${{matrix.setup.os}} | |
if: "!contains(github.event.head_commit.message, 'skip-ci')" | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax | |
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified | |
- name: Install conan | |
run: pip install conan>2 | |
- name: Get number of CPU cores | |
uses: SimenB/github-actions-cpu-cores@v2 | |
id: cpu-cores | |
- run: python3 Setup.py --options CompileBaryo=True --build-missing | |
- name: Set cmake preset name | |
run: python3 .github/GetProfile.py | |
- name: cmake | |
run: cmake --preset $GeneratedCMakeProfile | |
if: runner.os != 'Windows' | |
- name: build | |
run: cmake --build --preset $GeneratedCMakeProfile -j${{ steps.cpu-cores.outputs.count }} | |
if: runner.os != 'Windows' | |
- name: run tests | |
run: ctest --preset $GeneratedCMakeProfile -j --output-on-failure | |
if: runner.os != 'Windows' | |
- name: cmake | |
run: cmake --preset $env:GeneratedCMakeProfile | |
if: runner.os == 'Windows' | |
- name: build | |
run: cmake --build --preset $env:GeneratedCMakeProfile -j${{ steps.cpu-cores.outputs.count }} | |
if: runner.os == 'Windows' | |
- name: run tests | |
run: ctest --preset $env:GeneratedCMakeProfile -j --output-on-failure | |
if: runner.os == 'Windows' | |