Wheel builder #78
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: Wheel builder | |
| on: [workflow_dispatch] | |
| jobs: | |
| build_wheels: | |
| name: Build wheels for ${{ matrix.os }} | |
| runs-on: ${{ matrix.runs-on }} | |
| strategy: | |
| matrix: | |
| include: | |
| - os: linux-intel | |
| runs-on: ubuntu-latest | |
| - os: linux-arm | |
| runs-on: ubuntu-24.04-arm | |
| - os: windows-intel | |
| runs-on: windows-latest | |
| - os: macos-intel | |
| # macos-15-intel is the latest x86_64 runner | |
| runs-on: macos-15-intel | |
| - os: macos-arm | |
| # macos-14+ (including latest) are ARM64 runners | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: 'master' | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: 3.11 | |
| - name: Install cibuildwheel | |
| run: python -m pip install cibuildwheel==2.22.0 | |
| - name: Build wheels | |
| env: | |
| CIBW_SKIP: pp* *-musllinux_* *-manylinux_i686 *-win32 # skip PyPy, musllinux, 32-bit Linux & win32 builds | |
| CIBW_ARCHS_MACOS: auto | |
| CIBW_BUILD: cp39-* cp310-* cp311-* cp312-* cp313-* cp314-* | |
| run: python -m cibuildwheel --output-dir wheelhouse | |
| - name: Store artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: python-package-distributions-${{ matrix.os }} | |
| path: wheelhouse/*.whl | |
| package_source: | |
| name: Package source distribution | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: 'master' | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: 3.11 | |
| - name: Install build | |
| run: python -m pip install build | |
| - name: Run sdist | |
| run: python -m build --sdist | |
| - name: Store artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: python-package-distributions-src | |
| path: ./dist/*.tar.gz | |
| merge_build_files: | |
| name: Merge build files | |
| needs: | |
| - build_wheels | |
| - package_source | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Merge build files | |
| uses: actions/upload-artifact/merge@v4 | |
| with: | |
| name: python-package-distributions-all | |
| pattern: python-package-distributions-* | |
| delete-merged: true |