configure time error reporting for STDPAR feature and CI test #69
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 Wheels | |
| on: push | |
| jobs: | |
| build_wheels: | |
| name: Build wheels on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build wheels | |
| uses: pypa/cibuildwheel@v3.0.1 | |
| env: | |
| CIBW_BUILD: 'cp3{11,12,13}-*' | |
| CIBW_SKIP: > | |
| *musllinux* | |
| *-win32 | |
| *_i686 | |
| CIBW_BEFORE_BUILD: > | |
| python -m pip install --upgrade pip | |
| && pip install numpy | |
| && cmake -B build -S . | |
| -DPython3_FIND_STRATEGY=LOCATION | |
| -DCMAKE_BUILD_TYPE=Release | |
| -DSPIRIT_BUILD_FOR_PYTHON=ON | |
| -DSPIRIT_BUILD_TEST=ON | |
| -DSPIRIT_UI_CXX_USE_QT=OFF | |
| -DSPIRIT_UI_IMGUI=OFF | |
| && cmake --build build --config Release -j2 | |
| && ctest -C Release --test-dir build --output-on-failure | |
| CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28 | |
| CIBW_ENVIRONMENT: > | |
| SPIRIT_ADD_VERSION_SUFFIX=${{ github.ref != 'refs/heads/master' }} | |
| with: | |
| package-dir: ./core/python | |
| output-dir: wheelhouse | |
| config-file: "{package}/pyproject.toml" | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: cibw-wheels-${{ matrix.os }} | |
| path: ./wheelhouse/*.whl | |
| install_wheels: | |
| name: Install wheels on ${{ matrix.os }} (python-${{ matrix.python }}) | |
| runs-on: ${{ matrix.os }} | |
| needs: build_wheels | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| python: ["3.11", "3.12"] | |
| steps: | |
| - name: Set up Python ${{ matrix.python }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python }} | |
| - name: Download built wheels | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: cibw-wheels-${{ matrix.os }} | |
| path: wheelhouse | |
| - name: Install wheel in a clean env | |
| shell: bash | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install wheelhouse/*.whl | |
| - name: Smoke‑test import | |
| shell: bash | |
| run: | | |
| python - <<'EOF' | |
| import spirit | |
| print("Imported version:", spirit.__version__) | |
| from spirit import state | |
| with state.State(quiet=False) as p_state: | |
| pass | |
| EOF | |
| deploy-testpypi: | |
| name: Deploy to TestPyPI | |
| if: github.ref == 'refs/heads/develop' | |
| needs: ['build_wheels', 'install_wheels'] | |
| runs-on: ubuntu-latest | |
| environment: 'publish-testpypi' | |
| permissions: | |
| id-token: write | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: cibw-wheels-ubuntu-latest | |
| path: dist | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: cibw-wheels-macos-latest | |
| path: dist | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: cibw-wheels-windows-latest | |
| path: dist | |
| - name: Publish package distributions to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| repository-url: https://test.pypi.org/legacy/ | |
| deploy-pypi: | |
| name: Deploy to PyPI | |
| if: github.ref == 'refs/heads/master' | |
| needs: ['build_wheels', 'install_wheels'] | |
| runs-on: ubuntu-latest | |
| environment: 'publish-pypi' | |
| permissions: | |
| id-token: write | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: cibw-wheels-ubuntu-latest | |
| path: dist | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: cibw-wheels-macos-latest | |
| path: dist | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: cibw-wheels-windows-latest | |
| path: dist | |
| - name: Publish package distributions to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 |