Skip to content

Merge pull request #29 from egonw/missing/license #130

Merge pull request #29 from egonw/missing/license

Merge pull request #29 from egonw/missing/license #130

Workflow file for this run

## IMPORTANT: the configuration for cibuildwheel is kept in pyproject.toml
name: wheels
on: [push, pull_request]
jobs:
generate-wheels-matrix:
name: Generate wheels matrix
runs-on: ubuntu-latest
outputs:
include: ${{ steps.set-matrix.outputs.include }}
steps:
- uses: actions/checkout@v4
- name: Install cibuildwheel
run: pipx install cibuildwheel==2.22.0
- id: set-matrix
run: |
MATRIX=$(
{
cibuildwheel --print-build-identifiers --platform linux \
| jq -nRc '{"only": inputs, "os": "ubuntu-latest"}' \
&& cibuildwheel --print-build-identifiers --platform macos --arch x86_64 \
| jq -nRc '{"only": inputs, "os": "macos-13"}' \
&& cibuildwheel --print-build-identifiers --platform macos --arch arm64 \
| jq -nRc '{"only": inputs, "os": "macos-14"}' \
&& cibuildwheel --print-build-identifiers --platform windows \
| jq -nRc '{"only": inputs, "os": "windows-latest"}'
} | jq -sc
)
echo "include=$MATRIX" >> $GITHUB_OUTPUT
build_wheels:
name: Build ${{ matrix.only }}
needs: generate-wheels-matrix
runs-on: ${{ matrix.os }}
strategy:
matrix:
include: ${{ fromJson(needs.generate-wheels-matrix.outputs.include) }}
steps:
- uses: actions/checkout@v4
- name: Build wheels
uses: pypa/[email protected]
with:
only: ${{ matrix.only }}
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.only }}
path: ./wheelhouse/*.whl