refactor float32 get/set #108
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 | |
| cmake --build build | |
| - name: "Configure and build (Windows)" | |
| if: startsWith(runner.os, 'Windows') | |
| run: | | |
| cmake . -B build -A x64 | |
| cmake --build build --config Release | |
| - name: "Read model name (Linux)" | |
| run: | | |
| echo "MODEL_PATH=$(cat build/model.txt)" >> $GITHUB_ENV | |
| if: runner.os != 'Windows' | |
| - name: "Read model name (Windows)" | |
| run: | | |
| echo "MODEL_PATH=$(cat build/model.txt)" | Out-File -FilePath $env:GITHUB_ENV -Append | |
| if: runner.os == 'Windows' | |
| - name: "Archive library" | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: binaries-${{ matrix.os }} | |
| path: build/${{ env.MODEL_PATH }}/binaries | |
| - name: "Archive modelDescription.xml" | |
| if: startsWith(runner.os, 'Linux') | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: modelDescription | |
| path: build/${{ env.MODEL_PATH }}/modelDescription.xml | |
| deploy: | |
| needs: build | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: "Download binaries" | |
| uses: actions/download-artifact@v4 | |
| with: | |
| pattern: binaries-* | |
| path: model/binaries | |
| merge-multiple: true | |
| - name: "Download modelDescription.xml" | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: modelDescription | |
| path: model | |
| - name: "Set permissions" | |
| run: | | |
| sudo chmod -R +x model/binaries | |
| - name: "Upload FMU" | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: model | |
| path: model |