Fix intermittent ONNX Runtime teardown deadlock (tests hang in VS Code) #115
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: Build and test the project master branch | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| branches: | |
| - master | |
| jobs: | |
| build_and_test: | |
| strategy: | |
| matrix: | |
| include: | |
| - name: x86-windows | |
| image: windows-2022 | |
| arch: x86 | |
| python-version: "3.10" | |
| - name: x86_64-windows | |
| image: windows-2022 | |
| arch: x86_64 | |
| python-version: "3.10" | |
| - name: x86_64-linux | |
| image: ubuntu-22.04 | |
| arch: x86_64 | |
| python-version: "3.10" | |
| - name: aarch64-darwin | |
| image: macos-15 | |
| arch: aarch64 | |
| python-version: "3.10" | |
| - name: x86-windows-py313 | |
| image: windows-2022 | |
| arch: x86 | |
| python-version: "3.13" | |
| - name: x86_64-windows-py313 | |
| image: windows-2022 | |
| arch: x86_64 | |
| python-version: "3.13" | |
| - name: x86_64-linux-py313 | |
| image: ubuntu-22.04 | |
| arch: x86_64 | |
| python-version: "3.13" | |
| - name: aarch64-darwin-py313 | |
| image: macos-15 | |
| arch: aarch64 | |
| python-version: "3.13" | |
| runs-on: ${{ matrix.image }} | |
| steps: | |
| - name: Update aarch64 Linux runner | |
| if: matrix.name == 'aarch64-linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install gcc-aarch64-linux-gnu qemu-user | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: "pip" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install numpy pandas onnx jinja2 loguru typer fmpy cmake | |
| pip install -e . | |
| - name: Install pywin32 (Windows) | |
| if: runner.os == 'Windows' | |
| run: | | |
| pip install pywin32 | |
| - name: Python unit tests | |
| if: runner.os != 'macOS' | |
| run: | | |
| python -m unittest tests.test_variables | |
| python -m unittest tests.test_model | |
| python -m unittest tests.test_model_description | |
| python -m unittest tests.test_app.TestApp | |
| python -m unittest tests.test_app.TestExample1 | |
| python -m unittest tests.test_app.TestExample2 | |
| python -m unittest tests.test_app.TestExample3 | |
| python -m unittest tests.test_app.TestExample4 | |
| - name: Build example4 FMI 2.0 (Windows) | |
| if: runner.os == 'Windows' | |
| shell: cmd | |
| run: | | |
| onnx2fmu build ^ | |
| examples/example4/example4.onnx ^ | |
| examples/example4/example4Description.json ^ | |
| target ^ | |
| --fmi-platform ${{ matrix.name }} ^ | |
| --cmake-config Debug | |
| - name: Build example4 FMI 2.0 (non-Windows) | |
| if: runner.os != 'Windows' | |
| shell: bash | |
| run: | | |
| onnx2fmu build \ | |
| examples/example4/example4.onnx \ | |
| examples/example4/example4Description.json \ | |
| target \ | |
| --fmi-platform ${{ matrix.name }} \ | |
| --cmake-config Debug | |
| - name: Build example4 FMI 3.0 (Windows) | |
| if: runner.os == 'Windows' | |
| shell: cmd | |
| run: | | |
| onnx2fmu build ^ | |
| examples/example4/example4.onnx ^ | |
| examples/example4/example4DescriptionFMI3.json ^ | |
| target ^ | |
| --fmi-platform ${{ matrix.name }} ^ | |
| --cmake-config Debug | |
| - name: Build example4 FMI 3.0 (non-Windows) | |
| if: runner.os != 'Windows' | |
| shell: bash | |
| run: | | |
| onnx2fmu build \ | |
| examples/example4/example4.onnx \ | |
| examples/example4/example4DescriptionFMI3.json \ | |
| target \ | |
| --fmi-platform ${{ matrix.name }} \ | |
| --cmake-config Debug |