From b6df7ddf2ebd1a5ba69e38922b3e8fc6095d9a06 Mon Sep 17 00:00:00 2001 From: Yoch Melka Date: Tue, 20 Oct 2026 08:29:41 +0300 Subject: [PATCH] Build wheels with cibuildwheel Build CPython 3.9-3.14 wheels on Linux x86_64 (manylinux), macOS x86_64 and arm64, and Windows amd64. Every wheel is tested with the project test suite. The workflow runs on tag pushes and can be dispatched manually for an existing tag; it only produces artifacts, upload to PyPI stays explicit. --- .github/workflows/wheels.yml | 51 ++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/wheels.yml 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