Python PySDD package #70
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: Python PySDD package | |
| on: | |
| workflow_dispatch: | |
| release: | |
| types: [published] | |
| jobs: | |
| build_wheels: | |
| name: Build wheels on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [windows-latest, ubuntu-latest, macos-13, macos-14, ubuntu-24.04-arm] | |
| fail-fast: true | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build wheels | |
| uses: pypa/cibuildwheel@v2.21.3 | |
| env: | |
| CIBW_ARCHS_WINDOWS: auto ARM64 | |
| CIBW_SKIP: cp36-* cp37-* pp* *i686 *ppc64le *s390x *win32* | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: dist-${{ matrix.os }}-${{ strategy.job-index }} | |
| path: ./wheelhouse/*.whl | |
| build_pyodide_wheel: | |
| name: Build Pyodide wheel | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Build wheels | |
| uses: pypa/cibuildwheel@v2.21.3 | |
| env: | |
| CIBW_PLATFORM: pyodide | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: pyodide-wheel | |
| path: ./wheelhouse/*.whl | |
| build_sdist: | |
| name: Prepare source distribution | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.9' | |
| - name: Build | |
| run: | | |
| python -m pip install build | |
| python -m build --sdist | |
| - name: Store artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: dist-source | |
| path: dist/*.tar.gz | |
| upload_wheels: | |
| name: Upload wheels to PyPi | |
| runs-on: ubuntu-latest | |
| needs: [ build_wheels,build_sdist,build_pyodide_wheel ] | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| pattern: dist-* | |
| merge-multiple: true | |
| path: pypi_wheels | |
| - name: Publish package to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| if: startsWith(github.ref, 'refs/tags/') | |
| with: | |
| user: __token__ | |
| password: ${{ secrets.PYPI_API_TOKEN }} | |
| packages_dir: pypi_wheels/ | |
| skip_existing: true | |
| release_wheels: | |
| name: Upload wheels to Release | |
| runs-on: ubuntu-latest | |
| needs: [ build_wheels,build_sdist,build_pyodide_wheel ] | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| if: startsWith(github.ref, 'refs/tags/') | |
| with: | |
| merge-multiple: true | |
| path: all_wheels | |
| - name: Publish wheels in release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: all_wheels/* |