Build Wheels #1
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
| name: Build Wheels | |
| on: | |
| workflow_dispatch: # Manual trigger only to save CI minutes | |
| jobs: | |
| build_wheels: | |
| name: Build wheels on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| # Linux x86_64 | |
| - os: ubuntu-latest | |
| cibw_archs: "x86_64" | |
| # macOS Intel (x86_64) | |
| - os: macos-15-intel | |
| cibw_archs: "x86_64" | |
| # macOS Apple Silicon (arm64) | |
| - os: macos-15 | |
| cibw_archs: "arm64" | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Build wheels | |
| uses: pypa/cibuildwheel@v3.4 | |
| env: | |
| CIBW_ARCHS: ${{ matrix.cibw_archs }} | |
| - name: Upload wheels | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: wheels-${{ matrix.os }}-${{ matrix.cibw_archs }} | |
| path: ./wheelhouse/*.whl | |
| retention-days: 7 | |
| build_sdist: | |
| name: Build source distribution | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.12" | |
| - name: Install build dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install build | |
| - name: Build sdist | |
| run: python -m build --sdist | |
| - name: Upload sdist | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: sdist | |
| path: dist/*.tar.gz | |
| retention-days: 7 | |
| verify_wheels: | |
| name: Verify built wheels | |
| needs: [build_wheels, build_sdist] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/download-artifact@v6 | |
| with: | |
| path: dist | |
| merge-multiple: true | |
| - name: List artifacts | |
| run: | | |
| ls -lh dist/ | |
| echo "Total wheels: $(ls -1 dist/*.whl 2>/dev/null | wc -l)" | |
| echo "Total sdist: $(ls -1 dist/*.tar.gz 2>/dev/null | wc -l)" |