Skip to content

Commit 0708090

Browse files
committed
Add build steps for more python versions
1 parent 71e6b24 commit 0708090

File tree

1 file changed

+31
-24
lines changed

1 file changed

+31
-24
lines changed

.circleci/config.yml

Lines changed: 31 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,24 @@ orbs:
33
elixir: membraneframework/elixir@1
44

55
executors:
6-
linux_x86_executor:
6+
python_linux_x86_executor:
77
docker:
8-
- image: membraneframeworklabs/docker_membrane
8+
- image: cimg/python:3.11
99
resource_class: medium
1010

11-
linux_arm_executor:
11+
python_linux_arm_executor:
1212
docker:
13-
- image: membraneframeworklabs/docker_membrane
13+
- image: cimg/python:3.11
1414
resource_class: arm.medium
1515

16-
manylinux_x86_executor:
16+
linux_x86_executor:
1717
docker:
18-
- image: quay.io/pypa/manylinux2014_x86_64
18+
- image: membraneframeworklabs/docker_membrane
1919
resource_class: medium
2020

21-
manylinux_arm_executor:
21+
linux_arm_executor:
2222
docker:
23-
- image: quay.io/pypa/manylinux2014_aarch64
23+
- image: membraneframeworklabs/docker_membrane
2424
resource_class: arm.medium
2525

2626
macos_arm_executor:
@@ -79,21 +79,26 @@ commands:
7979
- artifacts
8080

8181
publish_python_package_linux:
82+
parameters:
83+
arch:
84+
type: string
85+
default: "auto"
8286
steps:
8387
- checkout:
8488
path: ~/project
89+
- setup_remote_docker
90+
8591
- run:
86-
name: Build wheel and repair with auditwheel
92+
name: Build wheels with cibuildwheel
8793
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
9197
- run:
9298
name: Publish to PyPI
93-
working_directory: ~/project/wheelhouse
9499
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/*
97102
98103
jobs:
99104
test_exclude_browser:
@@ -189,26 +194,28 @@ jobs:
189194
- checkout:
190195
path: ~/project
191196
- run:
192-
name: Install build and publish tools
193-
command: pip install build twine
197+
name: Install cibuildwheel
198+
command: pip install cibuildwheel twine
194199
- 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
197202
- run:
198203
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/*
200205

201206
publish_python_package_linux_x86:
202-
executor: manylinux_x86_executor
207+
executor: python_linux_x86_executor
203208
working_directory: ~/project/python
204209
steps:
205-
- publish_python_package_linux
210+
- publish_python_package_linux:
211+
arch: x86_64
206212

207213
publish_python_package_linux_arm:
208-
executor: manylinux_arm_executor
214+
executor: python_linux_arm_executor
209215
working_directory: ~/project/python
210216
steps:
211-
- publish_python_package_linux
217+
- publish_python_package_linux:
218+
arch: aarch64
212219

213220
build_python_docs:
214221
docker:

0 commit comments

Comments
 (0)