Add GitHub actions #4
Workflow file for this run
This file contains hidden or 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
name: Build the Reference FMUs | |
on: | |
push: | |
branches: [ main ] | |
tags: [ 'v*' ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
include: | |
- name: x86-windows | |
image: windows-2022 | |
arch: x86 | |
- name: x86_64-windows | |
image: windows-2022 | |
arch: x86_64 | |
- name: x86_64-linux | |
image: ubuntu-20.04 | |
arch: x86_64 | |
- name: x86_64-darwin | |
image: macos-12 | |
arch: x86_64 | |
runs-on: ${{ matrix.image }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- run: which python | |
- run: python -m pip install h5py matplotlib numpy pytest scipy setuptools | |
- run: python setup.py bdist_wheel | |
- run: pytho -m pip install dist/SDF-0.3.5-py3-none-any.whl | |
- run: pytest tests | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.name }} | |
path: dist/*.whl | |
if-no-files-found: error |