simplify #172
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: Cross-compile | |
| on: [push, workflow_dispatch] | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ ubuntu-22.04, windows-2022 ] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Configure and build (Linux) | |
| if: startsWith(runner.os, 'Linux') | |
| run: | | |
| cmake . -B build -DFMU4CPP_BUILD_EXAMPLES=ON -DFMU4CPP_BUILD_TESTS=OFF | |
| cmake --build build | |
| - name: Configure and build (Windows) | |
| if: startsWith(runner.os, 'Windows') | |
| run: | | |
| cmake . -B build -DFMU4CPP_BUILD_EXAMPLES=ON -DFMU4CPP_BUILD_TESTS=OFF -A x64 | |
| cmake --build build --config Release | |
| - name: Upload models | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: models-${{ matrix.os }} | |
| path: build/models | |
| deploy: | |
| needs: build | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: "Download models" | |
| uses: actions/download-artifact@v4 | |
| with: | |
| pattern: models-* | |
| path: models | |
| merge-multiple: true | |
| # - name: "Set permissions" | |
| # run: | | |
| # sudo chmod -R +x models/**/binaries | |
| - name: "Upload merged models" | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: models | |
| path: models |