Skip to content

add header

add header #51

Workflow file for this run

name: Cross-compile
on: [push, workflow_dispatch]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-20.04, windows-2019 ]
steps:
- uses: actions/checkout@v3
- 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@v3
with:
name: binaries
path: build/${{ env.MODEL_PATH }}/binaries
- name: "Archive modelDescription.xml"
if: startsWith(runner.os, 'Linux')
uses: actions/upload-artifact@v3
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@v3
with:
name: binaries
path: model/binaries
- name: "Download modelDescription.xml"
uses: actions/download-artifact@v3
with:
name: modelDescription
path: model
- name: "Set permissions"
run: |
sudo chmod -R +x model/binaries
- name: "Upload FMU"
uses: actions/upload-artifact@v3
with:
name: model
path: model