Skip to content

Commit 70b6666

Browse files
author
mkroemer
committed
Add Windows wheel support and CI
1 parent 1790b8e commit 70b6666

3 files changed

Lines changed: 89 additions & 2 deletions

File tree

.github/workflows/wheels.yml

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
name: Wheels
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
workflow_dispatch:
9+
release:
10+
types:
11+
- published
12+
13+
jobs:
14+
build_wheels:
15+
name: Build wheels on ${{ matrix.os }}
16+
runs-on: ${{ matrix.os }}
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
os:
21+
- ubuntu-latest
22+
- windows-latest
23+
- macos-13
24+
- macos-14
25+
26+
steps:
27+
- uses: actions/checkout@v4
28+
29+
- uses: actions/setup-python@v5
30+
with:
31+
python-version: '3.12'
32+
33+
- uses: pypa/cibuildwheel@v2.23.3
34+
env:
35+
CIBW_BUILD: cp311-* cp312-* cp313-* cp314-*
36+
CIBW_SKIP: pp* *-win32 *-manylinux_i686 *-musllinux_*
37+
CIBW_TEST_COMMAND: python -c "import pyclipper2; print(pyclipper2.__version__)"
38+
39+
- uses: actions/upload-artifact@v4
40+
with:
41+
name: wheels-${{ matrix.os }}
42+
path: wheelhouse/*.whl
43+
44+
build_sdist:
45+
name: Build sdist
46+
runs-on: ubuntu-latest
47+
48+
steps:
49+
- uses: actions/checkout@v4
50+
51+
- uses: actions/setup-python@v5
52+
with:
53+
python-version: '3.12'
54+
55+
- name: Build sdist
56+
run: |
57+
python -m pip install --upgrade build
58+
python -m build --sdist
59+
60+
- uses: actions/upload-artifact@v4
61+
with:
62+
name: sdist
63+
path: dist/*.tar.gz
64+
65+
publish:
66+
name: Publish to PyPI
67+
if: github.event_name == 'release'
68+
needs:
69+
- build_wheels
70+
- build_sdist
71+
runs-on: ubuntu-latest
72+
permissions:
73+
id-token: write
74+
75+
steps:
76+
- uses: actions/download-artifact@v4
77+
with:
78+
pattern: wheels-*
79+
path: dist
80+
merge-multiple: true
81+
82+
- uses: actions/download-artifact@v4
83+
with:
84+
name: sdist
85+
path: dist
86+
87+
- uses: pypa/gh-action-pypi-publish@release/v1

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ While one could leverage [Shapely](https://shapely.readthedocs.io/en/stable/) fo
99

1010
### ⚠️ Warning!
1111

12-
This package is very very early. I have only published wheels for python 3.13 and ARM Macs
12+
This package is very very early. Published wheels may lag behind some Python and platform combinations while CI coverage expands.
1313

1414

meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ project(
33
'cpp',
44
version: '0.0.8',
55
meson_version: '>=1.0.0',
6-
default_options: ['cpp_std=c++23', 'b_ndebug=if-release'],
6+
default_options: ['cpp_std=c++23,vc++latest,c++20,vc++20', 'b_ndebug=if-release'],
77
)
88

99
clipper2_inc = include_directories('external/clipper2/CPP/Clipper2Lib/include')

0 commit comments

Comments
 (0)