Build with macOS 13 in CI #802
Workflow file for this run
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
name: Build the Reference FMUs | |
on: | |
push: | |
branches: [ main ] | |
tags: [ 'v*' ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
lint-files: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- run: python3 build/lint_files.py | |
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: aarch64-linux | |
image: ubuntu-20.04 | |
arch: aarch64 | |
- name: x86_64-darwin | |
image: macos-13 | |
arch: x86_64 | |
- name: aarch64-darwin | |
image: macos-13 | |
arch: aarch64 | |
runs-on: ${{ matrix.image }} | |
needs: lint-files | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- run: which python | |
- run: python -m pip install fmpy==0.3.21 pytest requests scipy | |
- if: matrix.name == 'aarch64-linux' | |
run: | | |
sudo apt-get update | |
sudo apt-get install gcc-aarch64-linux-gnu qemu-user | |
- run: python build/build_cvode.py ${{ matrix.name }} | |
- run: python build/build_libxml2.py ${{ matrix.name }} | |
- run: python build/build_zlib.py ${{ matrix.name }} | |
- run: python build/build.py ${{ matrix.name }} | |
- if: matrix.name != 'aarch64-darwin' | |
run: pytest tests --platform ${{ matrix.name }} | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.name }} | |
path: build/fmus | |
if-no-files-found: error | |
merge-fmus: | |
runs-on: ubuntu-20.04 | |
needs: [build] | |
steps: | |
- uses: s-weigand/setup-conda@v1 | |
with: | |
conda-channels: conda-forge | |
- run: python -m pip install fmpy==0.3.20 pytest scipy kaleido markdown2 plotly pytz | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: x86-windows | |
path: dist-x86-windows | |
- uses: actions/download-artifact@v4 | |
with: | |
name: x86_64-windows | |
path: dist-x86_64-windows | |
- uses: actions/download-artifact@v4 | |
with: | |
name: x86_64-linux | |
path: dist-x86_64-linux | |
- uses: actions/download-artifact@v4 | |
with: | |
name: aarch64-linux | |
path: dist-aarch64-linux | |
- uses: actions/download-artifact@v4 | |
with: | |
name: x86_64-darwin | |
path: dist-x86_64-darwin | |
- uses: actions/download-artifact@v4 | |
with: | |
name: aarch64-darwin | |
path: dist-aarch64-darwin | |
- run: chmod +x dist-x86_64-linux/fmusim-x86_64-linux/fmusim | |
- run: git status --porcelain --untracked=no | |
- run: git tag --contains | |
- run: git rev-parse --short HEAD | |
- run: python3 build/merge_binaries.py | |
- run: git status --porcelain --untracked=no | |
- run: git tag --contains | |
- run: git rev-parse --short HEAD | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: Reference-FMUs | |
path: dist-merged | |
if-no-files-found: error |