Adding get_capability_flags for FMI3 ME #1003
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
| on: | |
| push: | |
| pull_request: | |
| permissions: | |
| contents: read | |
| jobs: | |
| linux: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python_version: [3.9.x, 3.11.x] | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python_version }} | |
| - name: Setup Python | |
| run: | | |
| python3 -m pip install Cython numpy scipy matplotlib pytest setuptools==69.1.0 | |
| - name: Install system | |
| run: | | |
| sudo apt-get -y install cmake liblapack-dev libsuitesparse-dev libhypre-dev | |
| sudo cp -v /usr/lib/x86_64-linux-gnu/libblas.so /usr/lib/x86_64-linux-gnu/libblas_OPENMP.so | |
| - name: Install superlu | |
| run: | | |
| cd /tmp | |
| curl -fSsL https://github.com/xiaoyeli/superlu_mt/archive/refs/tags/v4.0.1.tar.gz | tar xz | |
| cd superlu_mt-4.0.1 | |
| cmake -Denable_examples=OFF -Denable_tests=OFF -DPLAT="_OPENMP" -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib -DSUPERLUMT_INSTALL_INCLUDEDIR=include . | |
| make -j4 | |
| sudo make install | |
| - name: Install sundials | |
| run: | | |
| git clone --depth 1 -b v2.7.0 https://github.com/LLNL/sundials /tmp/sundials | |
| cd /tmp/sundials | |
| echo "target_link_libraries(sundials_idas_shared lapack blas superlu_mt_OPENMP)" >> src/idas/CMakeLists.txt | |
| echo "target_link_libraries(sundials_kinsol_shared lapack blas superlu_mt_OPENMP)" >> src/kinsol/CMakeLists.txt | |
| cmake -LAH -DSUPERLUMT_BLAS_LIBRARIES=blas -DSUPERLUMT_INCLUDE_DIR=/usr/include -DSUPERLUMT_LIBRARY=/usr/lib/libsuperlu_mt_OPENMP.a -DSUPERLUMT_THREAD_TYPE=OpenMP -DCMAKE_INSTALL_PREFIX=/usr -DSUPERLUMT_ENABLE=ON -DLAPACK_ENABLE=ON -DEXAMPLES_ENABLE=OFF -B build . | |
| cd build | |
| make -j4 | |
| sudo make install | |
| - name: Install assimulo | |
| run: | | |
| git clone --depth 1 -b Assimulo-3.7.0 https://github.com/modelon-community/Assimulo /tmp/Assimulo | |
| cd /tmp/Assimulo | |
| rm setup.cfg | |
| python3 setup.py install --user --sundials-home=/usr --blas-home=/usr/lib/x86_64-linux-gnu/ --lapack-home=/usr/lib/x86_64-linux-gnu/ --superlu-home=/usr | |
| - name: Install fmilib | |
| run: | | |
| cd /tmp | |
| curl -fSsL https://github.com/modelon-community/fmi-library/archive/3.0.4.tar.gz | tar xz | |
| cd fmi-library-3.0.4 | |
| cmake -DCMAKE_INSTALL_PREFIX=/usr -DFMILIB_BUILD_TESTS=OFF -B build . | |
| cd build | |
| make -j4 | |
| sudo make install | |
| - name: Build | |
| run: python3 setup.py install --user --fmil-home=/usr | |
| - name: Test | |
| run: pytest |