12
12
strategy :
13
13
fail-fast : false
14
14
matrix :
15
- os : [ubuntu-22.04, macos-latest, windows-latest]
15
+ include :
16
+ - os : " ubuntu-22.04"
17
+ arch : " x86_64"
18
+ - os : " ubuntu-22.04"
19
+ arch : " aarch64"
20
+ - os : " macos-13"
21
+ arch : " x86_64"
22
+ macosx_deployment_target : " 13.0"
23
+ - os : " macos-14"
24
+ arch : " arm64"
25
+ macosx_deployment_target : " 14.0"
26
+ - os : " windows-latest"
27
+ arch : " auto64"
28
+ triplet : " x64-windows"
29
+ - os : " windows-latest"
30
+ arch : " auto32"
31
+ triplet : " x86-windows"
16
32
17
33
steps :
18
34
- uses : actions/checkout@v4
@@ -22,43 +38,41 @@ jobs:
22
38
- uses : actions/setup-python@v5
23
39
name : Install Python
24
40
with :
25
- python-version : ' 3.8 '
41
+ python-version : ' 3.9 '
26
42
27
- - name : Prepare compiler environment for Windows
28
- if : runner.os == 'Windows '
29
- uses : ilammy/msvc-dev-cmd@v1
43
+ - name : Set up QEMU
44
+ if : runner.os == 'Linux '
45
+ uses : docker/setup-qemu-action@v3
30
46
with :
31
- arch : amd64
32
-
33
- - name : Install cibuildwheel
34
- run : |
35
- python -m pip install --upgrade pip
36
- python -m pip install -r requirements-cibw.txt
47
+ platforms : all
37
48
38
49
- name : Build wheels
50
+
39
51
env :
40
- CIBW_MANYLINUX_X86_64_IMAGE : quay.io/pypa/manylinux2010_x86_64:latest
41
- CIBW_MANYLINUX_I686_IMAGE : quay.io/pypa/manylinux2010_i686:latest
42
- CIBW_BUILD : cp38-* cp39-* cp310-* cp311-*
43
- CIBW_SKIP : " *-win32"
52
+ # configure cibuildwheel to build native archs ('auto'), and some
53
+ # emulated ones, plus cross-compile on macos
54
+ CIBW_ARCHS : ${{ matrix.arch }}
55
+ CIBW_TEST_SKIP : " *_arm64 *universal2:arm64 *linux_i686"
56
+ CIBW_MANYLINUX_X86_64_IMAGE : manylinux2014
57
+ CIBW_MANYLINUX_I686_IMAGE : manylinux2010
58
+ CIBW_BUILD : cp38-* cp39-* cp310-* cp311-* cp312-*
59
+ CIBW_SKIP : " *musllinux* *i686"
44
60
CIBW_BEFORE_ALL_LINUX : >
45
- yum -y -q --enablerepo=extras install epel-release
46
- && yum install -y re2-devel ninja-build
47
- CIBW_REPAIR_WHEEL_COMMAND_LINUX : " auditwheel show {wheel} && auditwheel repair -w {dest_dir} {wheel}"
61
+ yum -y update && yum -y install epel-release && yum install -y re2-devel ninja-build
48
62
CIBW_BEFORE_ALL_MACOS : >
49
- brew install re2 pybind11 ninja
50
- CIBW_ENVIRONMENT_MACOS : MACOSX_DEPLOYMENT_TARGET= 10.09
51
- CIBW_REPAIR_WHEEL_COMMAND_MACOS : " pip uninstall -y delocate && pip install git+https://github.com/Chia-Network/delocate.git && delocate-listdeps {wheel} && delocate-wheel -w {dest_dir} -v {wheel} "
63
+ brew install re2 pybind11
64
+ # macos target should be at least 10.13 to get full c++17
65
+ CIBW_ENVIRONMENT_MACOS : MACOSX_DEPLOYMENT_TARGET=${{ matrix.macosx_deployment_target }}
52
66
CIBW_BEFORE_ALL_WINDOWS : >
53
- vcpkg install re2:x64-windows
67
+ vcpkg install pkgconf:${{ matrix.triplet }} re2:${{ matrix.triplet }}
54
68
&& vcpkg integrate install
55
69
CIBW_ENVIRONMENT_WINDOWS : ' CMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake'
56
- CIBW_TEST_COMMAND : python -c "import re2"
57
- run : |
58
- python -m cibuildwheel --output-dir wheelhouse
70
+ CIBW_TEST_REQUIRES : " "
71
+ CIBW_TEST_COMMAND : " "
59
72
60
73
- uses : actions/upload-artifact@v4
61
74
with :
75
+ name : wheels-${{ matrix.os }}-${{ matrix.arch }}
62
76
path : ./wheelhouse/*.whl
63
77
64
78
build_sdist :
@@ -70,12 +84,12 @@ jobs:
70
84
- uses : actions/setup-python@v5
71
85
name : Install Python
72
86
with :
73
- python-version : ' 3.8 '
87
+ python-version : ' 3.9 '
74
88
75
89
- name : Build sdist
76
90
run : |
77
- pip install pep517
78
- python -m pep517. build -s .
91
+ pip install build
92
+ python -m build -s .
79
93
80
94
- uses : actions/upload-artifact@v4
81
95
with :
@@ -99,10 +113,13 @@ jobs:
99
113
- uses : actions/setup-python@v5
100
114
name : Install Python
101
115
with :
102
- python-version : 3.7
116
+ python-version : 3.9
103
117
104
- # download all artifacts to project dir
118
+ # download all artifacts to artifacts dir
105
119
- uses : actions/download-artifact@v4
120
+ with :
121
+ merge-multiple : true
122
+ path : artifacts
106
123
107
124
- name : Generate changes file
108
125
uses : sarnold/gitchangelog-action@master
@@ -121,7 +138,7 @@ jobs:
121
138
draft : false
122
139
prerelease : false
123
140
# uncomment below to upload wheels to github releases
124
- files : dist/cibw-wheels/ pyre2*.whl
141
+ files : artifacts/ pyre2*
125
142
126
143
- uses : pypa/gh-action-pypi-publish@master
127
144
if : ${{ github.actor == github.repository_owner && github.ref == 'refs/heads/master' }}
0 commit comments