fmiplatform: Use target platform #506
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
| # Basic compilation and unit testing via GitHub Actions. | |
| # Full CI testing is also run internally by Modelon (via Jenkinsfile.groovy). | |
| on: | |
| push: | |
| pull_request: | |
| permissions: | |
| contents: read | |
| jobs: | |
| linux: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install system | |
| run: sudo apt-get update -y && sudo apt-get -y install cmake | |
| - name: Build | |
| run: | | |
| cmake -DCMAKE_INSTALL_PREFIX=~/.local -DFMILIB_GENERATE_DOXYGEN_DOC=0 -B build_cmake . | |
| cmake --build build_cmake --target install --parallel 4 | |
| - name: Test | |
| run: ctest --test-dir build_cmake --output-on-failure | |
| - name: Test Installation | |
| run: | | |
| cmake -DFMIL_HOME=~/.local -B build_test_install -LAH Test/test_installation/ | |
| cmake --build build_test_install --target all | |
| ctest --test-dir build_test_install --output-on-failure | |
| - name: Install third-party libs | |
| run: sudo apt-get -y install libminizip-dev libexpat1-dev | |
| - name: Build external | |
| run: | | |
| cmake -DCMAKE_INSTALL_PREFIX=~/.local -DFMILIB_GENERATE_DOXYGEN_DOC=0 -DFMILIB_EXTERNAL_LIBS=ON -DFMILIB_BUILD_STATIC_LIB=OFF -B build_external . | |
| cmake --build build_external --target install --parallel 4 | |
| - name: Test external | |
| run: ctest --test-dir build_external --output-on-failure | |
| windows: | |
| runs-on: windows-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build Ninja | |
| run: | | |
| cmake -DCMAKE_INSTALL_PREFIX="$($HOME -replace '\\', '/')/fmilib" -DFMILIB_GENERATE_DOXYGEN_DOC=0 -B build_ninja -G Ninja -LAH . && | |
| cmake --build build_ninja --target install --parallel 4 | |
| - name: Test | |
| run: ctest --test-dir build_ninja --output-on-failure | |
| - name: Build VS | |
| run: | | |
| cmake -DCMAKE_INSTALL_PREFIX="$($HOME -replace '\\', '/')/fmilib_install_vs" -DFMILIB_GENERATE_DOXYGEN_DOC=0 -DFMILIB_BUILD_TESTS=OFF -B build_vs -LAH . && | |
| cmake --build build_vs --target install --config Release --parallel 4 | |
| - name: Test Installation | |
| run: | | |
| cmake -DFMIL_HOME="$($HOME -replace '\\', '/')/fmilib_install_vs" -B build_test_install_vs -LAH Test/test_installation/ && | |
| cmake --build build_test_install_vs --target ALL_BUILD && | |
| ctest --test-dir build_test_install_vs --output-on-failure | |
| macos: | |
| runs-on: macos-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build | |
| run: | | |
| cmake -DCMAKE_INSTALL_PREFIX=~/.local -DFMILIB_GENERATE_DOXYGEN_DOC=0 -B build_cmake . | |
| cmake --build build_cmake --target install --parallel 3 | |
| - name: Test | |
| run: ctest --test-dir build_cmake --output-on-failure | |
| - name: Test Installation | |
| run: | | |
| cmake -DFMIL_HOME=~/.local -B build_test_install -LAH Test/test_installation/ | |
| cmake --build build_test_install --target all | |
| ctest --test-dir build_test_install --output-on-failure |