|
3 | 3 | elixir: membraneframework/elixir@1 |
4 | 4 |
|
5 | 5 | executors: |
6 | | - linux_x86_executor: |
| 6 | + python_linux_x86_executor: |
7 | 7 | docker: |
8 | | - - image: membraneframeworklabs/docker_membrane |
| 8 | + - image: cimg/python:3.11 |
9 | 9 | resource_class: medium |
10 | 10 |
|
11 | | - linux_arm_executor: |
| 11 | + python_linux_arm_executor: |
12 | 12 | docker: |
13 | | - - image: membraneframeworklabs/docker_membrane |
| 13 | + - image: cimg/python:3.11 |
14 | 14 | resource_class: arm.medium |
15 | 15 |
|
16 | | - manylinux_x86_executor: |
| 16 | + linux_x86_executor: |
17 | 17 | docker: |
18 | | - - image: quay.io/pypa/manylinux2014_x86_64 |
| 18 | + - image: membraneframeworklabs/docker_membrane |
19 | 19 | resource_class: medium |
20 | 20 |
|
21 | | - manylinux_arm_executor: |
| 21 | + linux_arm_executor: |
22 | 22 | docker: |
23 | | - - image: quay.io/pypa/manylinux2014_aarch64 |
| 23 | + - image: membraneframeworklabs/docker_membrane |
24 | 24 | resource_class: arm.medium |
25 | 25 |
|
26 | 26 | macos_arm_executor: |
@@ -79,21 +79,26 @@ commands: |
79 | 79 | - artifacts |
80 | 80 |
|
81 | 81 | publish_python_package_linux: |
| 82 | + parameters: |
| 83 | + arch: |
| 84 | + type: string |
| 85 | + default: "auto" |
82 | 86 | steps: |
83 | 87 | - checkout: |
84 | 88 | path: ~/project |
| 89 | + - setup_remote_docker |
| 90 | + |
85 | 91 | - run: |
86 | | - name: Build wheel and repair with auditwheel |
| 92 | + name: Build wheels with cibuildwheel |
87 | 93 | command: | |
88 | | - /opt/python/cp311-cp311/bin/pip install build twine |
89 | | - /opt/python/cp311-cp311/bin/python -m build --wheel |
90 | | - auditwheel repair dist/*.whl --wheel-dir ../wheelhouse |
| 94 | + pip install cibuildwheel |
| 95 | + mkdir -p wheelhouse |
| 96 | + CIBW_ARCHS=<< parameters.arch >> CIBW_SKIP="*musllinux*" cibuildwheel --output-dir wheelhouse |
91 | 97 | - run: |
92 | 98 | name: Publish to PyPI |
93 | | - working_directory: ~/project/wheelhouse |
94 | 99 | command: | |
95 | | - /opt/python/cp311-cp311/bin/pip install twine |
96 | | - /opt/python/cp311-cp311/bin/twine upload --username __token__ --password $PYPI_API_KEY * |
| 100 | + pip install twine |
| 101 | + twine upload --username __token__ --password $PYPI_API_KEY wheelhouse/* |
97 | 102 |
|
98 | 103 | jobs: |
99 | 104 | test_exclude_browser: |
@@ -189,26 +194,28 @@ jobs: |
189 | 194 | - checkout: |
190 | 195 | path: ~/project |
191 | 196 | - run: |
192 | | - name: Install build and publish tools |
193 | | - command: pip install build twine |
| 197 | + name: Install cibuildwheel |
| 198 | + command: pip install cibuildwheel twine |
194 | 199 | - run: |
195 | | - name: Build wheel (no sdist) |
196 | | - command: python -m build --wheel |
| 200 | + name: Build wheels |
| 201 | + command: CIBW_PLATFORM=macos CIBW_ARCHS=arm64 cibuildwheel --output-dir wheelhouse |
197 | 202 | - run: |
198 | 203 | name: Publish to PyPI |
199 | | - command: twine upload --verbose --username __token__ --password $PYPI_API_KEY dist/* |
| 204 | + command: twine upload --verbose --username __token__ --password $PYPI_API_KEY wheelhouse/* |
200 | 205 |
|
201 | 206 | publish_python_package_linux_x86: |
202 | | - executor: manylinux_x86_executor |
| 207 | + executor: python_linux_x86_executor |
203 | 208 | working_directory: ~/project/python |
204 | 209 | steps: |
205 | | - - publish_python_package_linux |
| 210 | + - publish_python_package_linux: |
| 211 | + arch: x86_64 |
206 | 212 |
|
207 | 213 | publish_python_package_linux_arm: |
208 | | - executor: manylinux_arm_executor |
| 214 | + executor: python_linux_arm_executor |
209 | 215 | working_directory: ~/project/python |
210 | 216 | steps: |
211 | | - - publish_python_package_linux |
| 217 | + - publish_python_package_linux: |
| 218 | + arch: aarch64 |
212 | 219 |
|
213 | 220 | build_python_docs: |
214 | 221 | docker: |
|
0 commit comments