Skip to content

Commit 2ef7ab8

Browse files
committed
Make Python versions in GitHub Actions consistent
Consistently use the following Python versions everywhere in CI: - 3.8 - 3.9 - 3.10 - 3.11 - 3.12 - 3.13 - pypy3.9 - pypy3.10 The heels for Python 3.13 are beneficial for dependent packages such as `jsonschema`. Note that PyPy3.8 was dropped since the PyPy website (https://www.pypy.org/) states they currently support Python versions 3.10, 3.9, and 2.7. To build extension for PyPy on Windows, "generate-import-lib" in `Cargo.toml` is needed: PyO3/maturin-action#267 (comment)
1 parent 0b6ea67 commit 2ef7ab8

File tree

2 files changed

+65
-10
lines changed

2 files changed

+65
-10
lines changed

.github/workflows/CI.yml

+62-9
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,16 @@ jobs:
2121
- uses: actions/checkout@v4
2222
- uses: actions/setup-python@v5
2323
with:
24-
python-version: "3.x"
24+
python-version: |
25+
3.8
26+
3.9
27+
3.10
28+
3.11
29+
3.12
30+
3.13
31+
pypy3.9
32+
pypy3.10
33+
allow-prereleases: true
2534
- uses: pre-commit/action@v3.0.1
2635

2736
list:
@@ -64,6 +73,7 @@ jobs:
6473
3.11
6574
3.12
6675
3.13
76+
pypy3.9
6777
pypy3.10
6878
allow-prereleases: true
6979
- name: Set up nox
@@ -81,12 +91,21 @@ jobs:
8191
- uses: actions/checkout@v4
8292
- uses: actions/setup-python@v5
8393
with:
84-
python-version: "3.x"
94+
python-version: |
95+
3.8
96+
3.9
97+
3.10
98+
3.11
99+
3.12
100+
3.13
101+
pypy3.9
102+
pypy3.10
103+
allow-prereleases: true
85104
- name: Build wheels
86105
uses: PyO3/maturin-action@v1
87106
with:
88107
target: ${{ matrix.target }}
89-
args: --release --out dist --interpreter '3.8 3.9 3.10 3.11 3.12 pypy3.8 pypy3.9 pypy3.10'
108+
args: --release --out dist --interpreter '3.8 3.9 3.10 3.11 3.12 3.13 pypy3.9 pypy3.10'
90109
sccache: "true"
91110
manylinux: auto
92111
- name: Upload wheels
@@ -108,12 +127,21 @@ jobs:
108127
- uses: actions/checkout@v4
109128
- uses: actions/setup-python@v5
110129
with:
111-
python-version: "3.x"
130+
python-version: |
131+
3.8
132+
3.9
133+
3.10
134+
3.11
135+
3.12
136+
3.13
137+
pypy3.9
138+
pypy3.10
139+
allow-prereleases: true
112140
- name: Build wheels
113141
uses: PyO3/maturin-action@v1
114142
with:
115143
target: ${{ matrix.target }}
116-
args: --release --out dist --interpreter '3.8 3.9 3.10 3.11 3.12 pypy3.8 pypy3.9 pypy3.10'
144+
args: --release --out dist --interpreter '3.8 3.9 3.10 3.11 3.12 3.13 pypy3.9 pypy3.10'
117145
manylinux: musllinux_1_2
118146
sccache: "true"
119147
- name: Upload wheels
@@ -127,7 +155,7 @@ jobs:
127155
runs-on: windows-latest
128156
strategy:
129157
matrix:
130-
target: [x64, x86]
158+
target: [x64, x86] # x86 is not supported by pypy
131159
steps:
132160
- uses: actions/checkout@v4
133161
- uses: actions/setup-python@v5
@@ -138,12 +166,16 @@ jobs:
138166
3.10
139167
3.11
140168
3.12
169+
3.13
170+
${{ matrix.target == 'x64' && 'pypy3.9' || '' }}
171+
${{ matrix.target == 'x64' && 'pypy3.10' || '' }}
172+
allow-prereleases: true
141173
architecture: ${{ matrix.target }}
142174
- name: Build wheels
143175
uses: PyO3/maturin-action@v1
144176
with:
145177
target: ${{ matrix.target }}
146-
args: --release --out dist --interpreter '3.8 3.9 3.10 3.11 3.12'
178+
args: --release --out dist --interpreter '3.8 3.9 3.10 3.11 3.12 3.13' -- interpreter ${{ matrix.target == 'x64' && 'pypy3.9 pypy3.10' || '' }}
147179
sccache: "true"
148180
- name: Upload wheels
149181
uses: actions/upload-artifact@v3
@@ -161,12 +193,21 @@ jobs:
161193
- uses: actions/checkout@v4
162194
- uses: actions/setup-python@v5
163195
with:
164-
python-version: "3.x"
196+
python-version: |
197+
3.8
198+
3.9
199+
3.10
200+
3.11
201+
3.12
202+
3.13
203+
pypy3.9
204+
pypy3.10
205+
allow-prereleases: true
165206
- name: Build wheels
166207
uses: PyO3/maturin-action@v1
167208
with:
168209
target: ${{ matrix.target }}
169-
args: --release --out dist --interpreter '3.8 3.9 3.10 3.11 3.12 pypy3.8 pypy3.9 pypy3.10'
210+
args: --release --out dist --interpreter '3.8 3.9 3.10 3.11 3.12 3.13 pypy3.9 pypy3.10'
170211
sccache: "true"
171212
- name: Upload wheels
172213
uses: actions/upload-artifact@v3
@@ -179,6 +220,18 @@ jobs:
179220
runs-on: ubuntu-latest
180221
steps:
181222
- uses: actions/checkout@v4
223+
- uses: actions/setup-python@v5
224+
with:
225+
python-version: |
226+
3.8
227+
3.9
228+
3.10
229+
3.11
230+
3.12
231+
3.13
232+
pypy3.9
233+
pypy3.10
234+
allow-prereleases: true
182235
- name: Build an sdist
183236
uses: PyO3/maturin-action@v1
184237
with:

Cargo.toml

+3-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,6 @@ archery = "1.2.0"
1313

1414
[dependencies.pyo3]
1515
version = "0.22.1"
16-
features = ["extension-module"]
16+
# To build extension for PyPy on Windows, "generate-import-lib" is needed:
17+
# https://github.com/PyO3/maturin-action/issues/267#issuecomment-2106844429
18+
features = ["extension-module", "generate-import-lib"]

0 commit comments

Comments
 (0)