diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml new file mode 100644 index 0000000..810dd81 --- /dev/null +++ b/.github/workflows/wheels.yml @@ -0,0 +1,51 @@ +name: wheels + +on: + workflow_dispatch: + inputs: + ref: + description: Git ref to build (tag or branch) + required: true + default: "0.5.2" + push: + tags: + - "*" + +permissions: + contents: read + +jobs: + build_wheels: + name: ${{ matrix.os }} / ${{ matrix.archs }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + include: + - os: ubuntu-latest + archs: x86_64 + - os: macos-15-intel + archs: x86_64 + - os: macos-15 + archs: arm64 + - os: windows-latest + archs: AMD64 + steps: + - uses: actions/checkout@v5 + with: + ref: ${{ inputs.ref || github.ref }} + + - name: Build wheels + uses: pypa/cibuildwheel@v4.3.1 + env: + CIBW_ARCHS: ${{ matrix.archs }} + CIBW_BUILD: "cp39-* cp310-* cp311-* cp312-* cp313-* cp314-*" + CIBW_SKIP: "*-musllinux_*" + CIBW_TEST_REQUIRES: "pytest" + CIBW_TEST_COMMAND: "python -m pytest -q --import-mode=importlib {project}/tests" + + - uses: actions/upload-artifact@v7 + with: + name: wheels-${{ matrix.os }}-${{ matrix.archs }} + path: wheelhouse/*.whl + if-no-files-found: error