|
| 1 | +on: |
| 2 | + push: |
| 3 | + branches: [ main ] |
| 4 | + tags: [ 'v*' ] |
| 5 | + pull_request: |
| 6 | + branches: [ main ] |
| 7 | + |
| 8 | +jobs: |
| 9 | + build-win32-binaries: |
| 10 | + runs-on: windows-2022 |
| 11 | + steps: |
| 12 | + - uses: actions/checkout@v4 |
| 13 | + - run: cmake -S ./runtime -B ./runtime/win32 -G "Visual Studio 17 2022" -A Win32 |
| 14 | + - run: cmake --build ./runtime/win32 --config release --target install |
| 15 | + - uses: actions/upload-artifact@v4 |
| 16 | + with: |
| 17 | + name: win32 |
| 18 | + path: ./FMI/Resources/Library/win32/ModelicaFMI.dll |
| 19 | + if-no-files-found: error |
| 20 | + build-win64-binaries: |
| 21 | + runs-on: windows-2022 |
| 22 | + steps: |
| 23 | + - uses: actions/checkout@v4 |
| 24 | + - run: cmake -S ./runtime -B ./runtime/win64 -G "Visual Studio 17 2022" -A x64 |
| 25 | + - run: cmake --build ./runtime/win64 --config release --target install |
| 26 | + - uses: actions/upload-artifact@v4 |
| 27 | + with: |
| 28 | + name: win64 |
| 29 | + path: ./FMI/Resources/Library/win64/ModelicaFMI.dll |
| 30 | + if-no-files-found: error |
| 31 | + build-linux64-binaries: |
| 32 | + runs-on: ubuntu-22.04 |
| 33 | + steps: |
| 34 | + - uses: actions/checkout@v4 |
| 35 | + - run: cmake -S ./runtime -B ./runtime/linux64 |
| 36 | + - run: cmake --build ./runtime/linux64 --target install |
| 37 | + - uses: actions/upload-artifact@v4 |
| 38 | + with: |
| 39 | + name: linux64 |
| 40 | + path: ./FMI/Resources/Library/linux64/libModelicaFMI.so |
| 41 | + if-no-files-found: error |
| 42 | + build-darwin64-binaries: |
| 43 | + runs-on: macos-13 |
| 44 | + steps: |
| 45 | + - uses: actions/checkout@v4 |
| 46 | + - run: cmake -S ./runtime -B ./runtime/darwin64 -D "CMAKE_OSX_ARCHITECTURES=arm64;x86_64" |
| 47 | + - run: cmake --build ./runtime/darwin64 --target install |
| 48 | + - uses: actions/upload-artifact@v4 |
| 49 | + with: |
| 50 | + name: darwin64 |
| 51 | + path: ./FMI/Resources/Library/darwin64/libModelicaFMI.dylib |
| 52 | + if-no-files-found: error |
| 53 | + build-modelica-library: |
| 54 | + runs-on: ubuntu-22.04 |
| 55 | + needs: [build-win32-binaries, build-win64-binaries, build-linux64-binaries, build-darwin64-binaries] |
| 56 | + steps: |
| 57 | + - uses: actions/checkout@v4 |
| 58 | + - uses: actions/download-artifact@v4 |
| 59 | + with: |
| 60 | + name: win32 |
| 61 | + path: ./FMI/Resources/Library/win32/ |
| 62 | + - uses: actions/download-artifact@v4 |
| 63 | + with: |
| 64 | + name: win64 |
| 65 | + path: ./FMI/Resources/Library/win64/ |
| 66 | + - uses: actions/download-artifact@v4 |
| 67 | + with: |
| 68 | + name: linux64 |
| 69 | + path: ./FMI/Resources/Library/linux64/ |
| 70 | + - uses: actions/download-artifact@v4 |
| 71 | + with: |
| 72 | + name: darwin64 |
| 73 | + path: ./FMI/Resources/Library/darwin64/ |
| 74 | + - run: tree |
| 75 | + - uses: actions/upload-artifact@v4 |
| 76 | + with: |
| 77 | + name: Modelica-FMI |
| 78 | + path: | |
| 79 | + FMI/ |
| 80 | + LICENSE |
| 81 | + README.md |
| 82 | + if-no-files-found: error |
| 83 | + build-python-wheel: |
| 84 | + runs-on: ubuntu-22.04 |
| 85 | + steps: |
| 86 | + - uses: actions/checkout@v4 |
| 87 | + - uses: astral-sh/setup-uv@v4 |
| 88 | + - run: uv build modelica_fmi |
| 89 | + - uses: actions/upload-artifact@v4 |
| 90 | + with: |
| 91 | + name: dist |
| 92 | + path: modelica_fmi/dist/*.whl |
| 93 | + if-no-files-found: error |
0 commit comments