Rename build.yml to build.yaml #1
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: osmc | |
| on: [push] | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ ubuntu-latest, windows-latest , macos-latest ] | |
| steps: | |
| - uses: actions/checkout@v2 | |
| with: | |
| submodules: true | |
| ##- uses: lukka/get-cmake@latest | |
| - name: Set up CLANG | |
| if: matrix.os == 'ubuntu-latest' | |
| uses: egor-tensin/setup-clang@v1 | |
| with: | |
| version: 12 | |
| platform: x64 | |
| - name: Prepare MSYS on windows | |
| if: matrix.os == 'windows-latest' | |
| ##https://github.com/actions/virtual-environments/blob/main/images/win/Windows2019-Readme.md#notes | |
| ##https://stackoverflow.com/a/64831469 | |
| run: | | |
| echo "C:\msys64\mingw64\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
| echo "C:\msys64\usr\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
| - name: CMAKE on Unix | |
| if: matrix.os != 'windows-latest' | |
| run: | | |
| cmake . | |
| - name: CMAKE on Windows | |
| if: matrix.os == 'windows-latest' | |
| run: | | |
| cmake -G "MSYS Makefiles" . | |
| - name: make | |
| run: | | |
| make | |
| - name: make test | |
| if: matrix.os != 'windows-latest' | |
| run: | | |
| make test | |
| - name: Upload artifact macos | |
| if: matrix.os == 'macos-latest' | |
| uses: actions/upload-artifact@v2 | |
| with: | |
| name: osmcfmu.dylib | |
| path: oosmc-fmu/osmc.dylib | |
| - name: Upload artifact linux | |
| if: matrix.os == 'ubuntu-latest' | |
| uses: actions/upload-artifact@v2 | |
| with: | |
| name: osmcfmu.so | |
| path: oosmc-fmu/osmc.so | |
| - name: Upload artifact windows | |
| if: matrix.os == 'windows-latest' | |
| uses: actions/upload-artifact@v2 | |
| with: | |
| name: osmcfmu.dll | |
| path: oosmc-fmu/osmc.dll | |
| - name: Upload modelDescription.xml | |
| if: matrix.os == 'ubuntu-latest' | |
| uses: actions/upload-artifact@v2 | |
| with: | |
| name: modelDescription.xml | |
| path: oosmc-fmu/modelDescription.xml | |
| pack-fmu: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Download dll | |
| uses: actions/download-artifact@v2 | |
| with: | |
| name: osmcfmu.dll | |
| path: osmcfmu/binaries/win64/ | |
| - name: Download shared library | |
| uses: actions/download-artifact@v2 | |
| with: | |
| name: osmcfmu.so | |
| path: osmcfmu/binaries/linux64/ | |
| - name: Download dylib | |
| uses: actions/download-artifact@v2 | |
| with: | |
| name: osmcfmu.dylib | |
| path: osmcfmu/binaries/darwin64/ | |
| - name: Download model description file | |
| uses: actions/download-artifact@v2 | |
| with: | |
| name: modelDescription.xml | |
| path: osmcfmu/ | |
| - name: Upload FMU | |
| uses: actions/upload-artifact@v2 | |
| with: | |
| name: osmcfmu | |
| path: osmcfmu |