Skip to content

Commit 9011ae9

Browse files
authored
CI: add cp314/cp314t wheel builds; improve cp313t builds (#811)
* CI: pin setup-python action * CI: add cp314/cp314t wheel builds; improve cp313t builds This also adds Linux aarch64 and macOS x86-64 free-threaded wheels for Python 3.13 and 3.14.
2 parents 3f456b4 + 44464b2 commit 9011ae9

1 file changed

Lines changed: 11 additions & 46 deletions

File tree

.github/workflows/wheel_tests_and_release.yml

Lines changed: 11 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -34,28 +34,17 @@ jobs:
3434
fail-fast: false
3535
matrix:
3636
os: [ubuntu-latest]
37-
cibw_python: ["cp311", "cp312", "cp313", "cp313t"]
37+
cibw_python: ["cp311", "cp312", "cp313", "cp313t", "cp314", "cp314t"]
3838
cibw_arch: ["x86_64"]
3939
steps:
4040
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
4141
with:
4242
fetch-depth: 0
43-
- uses: actions/setup-python@v5
43+
- uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
4444
name: Install Python
4545
with:
4646
python-version: "3.12"
4747

48-
- name: Install build deps; set CIBW environment variables
49-
if: ${{ matrix.cibw_python }} == "cp313t"
50-
run: |
51-
PYPI_URL="https://pypi.anaconda.org/scientific-python-nightly-wheels/simple"
52-
CIBW_DEPS="pip install --pre -i $PYPI_URL cython &&\
53-
pip install numpy pytest meson-python ninja"
54-
NO_BUILD_ISOLATION="pip; args: --no-build-isolation"
55-
echo "CIBW_BEFORE_BUILD=$CIBW_DEPS" >> "$GITHUB_ENV"
56-
echo "CIBW_BEFORE_TEST=$CIBW_DEPS" >> "$GITHUB_ENV"
57-
echo "CIBW_BUILD_FRONTEND=$NO_BUILD_ISOLATION" >> "$GITHUB_ENV"
58-
5948
- name: Build the wheel
6049
uses: pypa/cibuildwheel@ffd835cef18fa11522f608fc0fa973b89f5ddc87 # v3.1.0
6150
with:
@@ -77,13 +66,13 @@ jobs:
7766
fail-fast: false
7867
matrix:
7968
os: [ubuntu-22.04-arm]
80-
cibw_python: ["cp311", "cp312", "cp313"]
69+
cibw_python: ["cp311", "cp312", "cp313", "cp313t", "cp314", "cp314t"]
8170
cibw_arch: ["aarch64"]
8271
steps:
8372
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
8473
with:
8574
fetch-depth: 0
86-
- uses: actions/setup-python@v5
75+
- uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
8776
name: Install Python
8877
with:
8978
python-version: "3.12"
@@ -95,6 +84,7 @@ jobs:
9584
env:
9685
CIBW_BUILD: ${{ matrix.cibw_python }}-*
9786
CIBW_ARCHS_LINUX: ${{ matrix.cibw_arch }}
87+
CIBW_ENABLE: cpython-freethreading
9888
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
9989
with:
10090
name: wheels_linux_${{ matrix.cibw_arch }}_${{ matrix.cibw_python }}
@@ -108,37 +98,23 @@ jobs:
10898
matrix:
10999
# macos-13 is the last runner that supports Intel (x86_64) architecture
110100
os: [macos-13, macos-14]
111-
cibw_python: ["cp311", "cp312", "cp313", "cp313t"]
101+
cibw_python: ["cp311", "cp312", "cp313", "cp313t", "cp314", "cp314t"]
112102
cibw_arch: ["x86_64", "arm64"]
113103
exclude:
114104
- os: macos-14
115105
cibw_arch: "x86_64"
116106
- os: macos-13
117107
cibw_arch: "arm64"
118-
- os: macos-13
119-
cibw_arch: "x86_64"
120-
cibw_python: "cp313t"
121108
steps:
122109
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
123110
with:
124111
fetch-depth: 0
125112

126-
- uses: actions/setup-python@v5
113+
- uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
127114
name: Install Python
128115
with:
129116
python-version: "3.12"
130117

131-
- name: Install build deps; set CIBW environment variables
132-
if: ${{ matrix.cibw_python }} == "cp313t"
133-
run: |
134-
PYPI_URL="https://pypi.anaconda.org/scientific-python-nightly-wheels/simple"
135-
CIBW_DEPS="pip install --pre -i $PYPI_URL cython &&\
136-
pip install numpy pytest meson-python ninja"
137-
NO_BUILD_ISOLATION="pip; args: --no-build-isolation"
138-
echo "CIBW_BEFORE_BUILD=$CIBW_DEPS" >> "$GITHUB_ENV"
139-
echo "CIBW_BEFORE_TEST=$CIBW_DEPS" >> "$GITHUB_ENV"
140-
echo "CIBW_BUILD_FRONTEND=$NO_BUILD_ISOLATION" >> "$GITHUB_ENV"
141-
142118
- name: Build wheels for CPython (macOS) (x86_64)
143119
if: matrix.cibw_arch == 'x86_64'
144120
uses: pypa/cibuildwheel@ffd835cef18fa11522f608fc0fa973b89f5ddc87 # v3.1.0
@@ -147,6 +123,7 @@ jobs:
147123
env:
148124
CIBW_BUILD: ${{ matrix.cibw_python }}-*
149125
CIBW_ARCHS_MACOS: ${{ matrix.cibw_arch }}
126+
CIBW_ENABLE: cpython-freethreading
150127

151128
- name: Build wheels for CPython (macOS) (arm64)
152129
if: matrix.cibw_arch == 'arm64'
@@ -172,13 +149,13 @@ jobs:
172149
matrix:
173150
os: [windows-latest]
174151
cibw_arch: ["AMD64", "x86"]
175-
cibw_python: ["cp311", "cp312", "cp313", "cp313t"]
152+
cibw_python: ["cp311", "cp312", "cp313", "cp313t", "cp314", "cp314t"]
176153
steps:
177154
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
178155
with:
179156
fetch-depth: 0
180157

181-
- uses: actions/setup-python@v5
158+
- uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
182159
name: Install Python
183160
with:
184161
python-version: "3.12"
@@ -195,18 +172,6 @@ jobs:
195172
with:
196173
architecture: x64
197174

198-
- name: Install build deps; set CIBW environment variables
199-
if: ${{ matrix.cibw_python }} == "cp313t"
200-
shell: bash -el {0}
201-
run: |
202-
PYPI_URL="https://pypi.anaconda.org/scientific-python-nightly-wheels/simple"
203-
CIBW_DEPS="pip install --pre -i $PYPI_URL cython numpy &&\
204-
pip install pytest meson-python ninja"
205-
NO_BUILD_ISOLATION="pip; args: --no-build-isolation"
206-
echo "CIBW_BEFORE_BUILD=$CIBW_DEPS" >> "$GITHUB_ENV"
207-
echo "CIBW_BEFORE_TEST=$CIBW_DEPS" >> "$GITHUB_ENV"
208-
echo "CIBW_BUILD_FRONTEND=$NO_BUILD_ISOLATION" >> "$GITHUB_ENV"
209-
210175
- name: Build Windows wheels for CPython
211176
uses: pypa/cibuildwheel@ffd835cef18fa11522f608fc0fa973b89f5ddc87 # v3.1.0
212177
with:
@@ -239,7 +204,7 @@ jobs:
239204
with:
240205
fetch-depth: 0
241206

242-
- uses: actions/setup-python@v5
207+
- uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
243208
name: Install Python
244209
with:
245210
python-version: "3.12"

0 commit comments

Comments
 (0)