diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml new file mode 100644 index 0000000..6f64ae9 --- /dev/null +++ b/.github/workflows/wheels.yml @@ -0,0 +1,87 @@ +name: Wheels + +on: + pull_request: + push: + branches: + - main + workflow_dispatch: + release: + types: + - published + +jobs: + build_wheels: + name: Build wheels on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - windows-latest + - macos-13 + - macos-14 + + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: '3.12' + + - uses: pypa/cibuildwheel@v2.23.3 + env: + CIBW_BUILD: cp311-* cp312-* cp313-* cp314-* + CIBW_SKIP: pp* *-win32 *-manylinux_i686 *-musllinux_* + CIBW_TEST_COMMAND: python -c "import pyclipper2; print(pyclipper2.__version__)" + + - uses: actions/upload-artifact@v4 + with: + name: wheels-${{ matrix.os }} + path: wheelhouse/*.whl + + build_sdist: + name: Build sdist + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: '3.12' + + - name: Build sdist + run: | + python -m pip install --upgrade build + python -m build --sdist + + - uses: actions/upload-artifact@v4 + with: + name: sdist + path: dist/*.tar.gz + + publish: + name: Publish to PyPI + if: github.event_name == 'release' + needs: + - build_wheels + - build_sdist + runs-on: ubuntu-latest + permissions: + id-token: write + + steps: + - uses: actions/download-artifact@v4 + with: + pattern: wheels-* + path: dist + merge-multiple: true + + - uses: actions/download-artifact@v4 + with: + name: sdist + path: dist + + - uses: pypa/gh-action-pypi-publish@release/v1 \ No newline at end of file diff --git a/README.md b/README.md index eb59078..f11c14e 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,6 @@ While one could leverage [Shapely](https://shapely.readthedocs.io/en/stable/) fo ### ⚠️ Warning! -This package is very very early. I have only published wheels for python 3.13 and ARM Macs +This package is very very early. Published wheels may lag behind some Python and platform combinations while CI coverage expands. diff --git a/external/clipper2 b/external/clipper2 index ef88ee9..45999c8 160000 --- a/external/clipper2 +++ b/external/clipper2 @@ -1 +1 @@ -Subproject commit ef88ee97c0e759792e43a2b2d8072def6c9244e8 +Subproject commit 45999c872cea8c630fb27bbaa24e8a5d9fa0ebfd diff --git a/meson.build b/meson.build index d57f90a..a3251c7 100644 --- a/meson.build +++ b/meson.build @@ -3,7 +3,7 @@ project( 'cpp', version: '0.0.8', meson_version: '>=1.0.0', - default_options: ['cpp_std=c++23', 'b_ndebug=if-release'], + default_options: ['cpp_std=c++23,vc++latest,c++20,vc++20', 'b_ndebug=if-release'], ) clipper2_inc = include_directories('external/clipper2/CPP/Clipper2Lib/include')