Skip to content
This repository was archived by the owner on Jul 5, 2023. It is now read-only.

Commit ca148cc

Browse files
authored
Upgrade cibuildwheel, add Python 3.11, musllinux wheels (#193)
- Upgrade GitHub Action versions. - Employ cibuildwheel action instead of manual setup. - This upgrade also changes the manylinux image to manylinux2014.
1 parent 0c09e09 commit ca148cc

File tree

1 file changed

+16
-44
lines changed

1 file changed

+16
-44
lines changed

.github/workflows/build.yml

+16-44
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,6 @@ name: Build wheels
33
on: [push, pull_request, workflow_dispatch]
44

55
jobs:
6-
test_prerelease_python:
7-
# needed because manylinux is hesitant to support pre-release python
8-
# so we can't just use cibuildwheel
9-
name: prelease python
10-
runs-on: ubuntu-latest
11-
steps:
12-
- uses: actions/checkout@v2
13-
- uses: actions/setup-python@v2
14-
with:
15-
python-version: '3.11-dev'
16-
- run: |
17-
python3.11 -m pip install -e .
18-
python3.11 -m pip install pytest
19-
python3.11 -m pytest
20-
216
build_wheels:
227
name: py${{ matrix.python-version }} on ${{ matrix.os }}
238
runs-on: ${{ matrix.os }}
@@ -27,30 +12,24 @@ jobs:
2712
# cibuildwheel builds linux wheels inside a manylinux container
2813
# it also takes care of procuring the correct python version for us
2914
os: [ubuntu-latest, windows-latest, macos-latest]
30-
python-version: [36, 37, 38, 39, 310]
15+
python-version: [36, 37, 38, 39, 310, 311]
16+
3117
steps:
32-
- uses: actions/checkout@v2
33-
- uses: actions/setup-python@v2
34-
name: Install Python
35-
with:
36-
python-version: "3.9"
37-
- name: Install cibuildwheel
38-
run: |
39-
python -m pip install "cibuildwheel==2.1.3"
18+
- uses: actions/checkout@v3
4019
- name: Build wheels
20+
uses: pypa/[email protected]
4121
env:
4222
CIBW_BUILD: "cp${{ matrix.python-version }}-*"
43-
CIBW_SKIP: "*-manylinux_i686 *-win32"
23+
CIBW_SKIP: "*-manylinux_i686 *-musllinux_i686 *-win32"
4424
CIBW_ARCHS_MACOS: "x86_64 arm64"
4525
CIBW_BUILD_VERBOSITY: 1
4626
CIBW_BEFORE_TEST: pip install pytest
4727
CIBW_TEST_COMMAND: pytest {package}
48-
run: |
49-
python -m cibuildwheel --output-dir wheelhouse .
50-
- uses: actions/upload-artifact@v2
28+
- uses: actions/upload-artifact@v3
5129
with:
5230
name: dist
5331
path: ./wheelhouse/*.whl
32+
5433
build_wheels_aarch64:
5534
name: py${{ matrix.python-version }} on ${{ matrix.os }} (aarch64)
5635
runs-on: ${{ matrix.os }}
@@ -60,40 +39,33 @@ jobs:
6039
# cibuildwheel builds linux wheels inside a manylinux container
6140
# it also takes care of procuring the correct python version for us
6241
os: [ubuntu-latest]
63-
python-version: [36, 37, 38, 39, 310]
42+
python-version: [36, 37, 38, 39, 310, 311]
6443

6544
steps:
66-
- uses: actions/checkout@v2
67-
- uses: actions/setup-python@v2
68-
name: Install Python
69-
with:
70-
python-version: "3.9"
45+
- uses: actions/checkout@v3
7146
- name: Setup up QEMU
72-
uses: docker/setup-qemu-action@v1
47+
uses: docker/setup-qemu-action@v2
7348
with:
7449
platforms: arm64
75-
- name: Install cibuildwheel
76-
run: |
77-
python -m pip install "cibuildwheel==2.1.3"
7850
- name: Build wheels
51+
uses: pypa/[email protected]
7952
env:
8053
CIBW_BUILD: "cp${{ matrix.python-version }}-*"
8154
CIBW_ARCHS: aarch64
8255
CIBW_BUILD_VERBOSITY: 1
8356
CIBW_BEFORE_TEST: pip install pytest
8457
CIBW_TEST_COMMAND: pytest {package}
85-
run: |
86-
python -m cibuildwheel --output-dir wheelhouse .
87-
- uses: actions/upload-artifact@v2
58+
- uses: actions/upload-artifact@v3
8859
with:
8960
name: dist
9061
path: ./wheelhouse/*.whl
62+
9163
build_sdist_python_wheel:
9264
name: sdist and python wheel
9365
runs-on: ubuntu-latest
9466
steps:
95-
- uses: actions/checkout@v2
96-
- uses: actions/setup-python@v2
67+
- uses: actions/checkout@v3
68+
- uses: actions/setup-python@v4
9769
name: Install Python
9870
with:
9971
python-version: "3.9"
@@ -105,7 +77,7 @@ jobs:
10577
run: |
10678
pip install --upgrade setuptools pip wheel
10779
python setup.py sdist
108-
- uses: actions/upload-artifact@v2
80+
- uses: actions/upload-artifact@v3
10981
with:
11082
name: dist
11183
path: |

0 commit comments

Comments
 (0)