@@ -203,7 +203,15 @@ jobs:
203
203
strategy :
204
204
fail-fast : false
205
205
matrix :
206
- python : ['3.9', '3.12']
206
+ include :
207
+ - python : ' 3.9'
208
+ cython : ' 2'
209
+ - python : ' 3.9'
210
+ cython : ' 3'
211
+ - python : ' 3.11'
212
+ cython : ' 2'
213
+ - python : ' 3.13'
214
+ cython : ' 3'
207
215
steps :
208
216
- name : Checkout
209
217
uses : actions/checkout@v4
@@ -216,18 +224,16 @@ jobs:
216
224
- name : install trio and setuptools
217
225
run : python -m pip install --upgrade pip . setuptools
218
226
219
- - name : install cython<3
220
- run : python -m pip install "cython<3"
221
- - name : compile pyx file
222
- run : cythonize -i tests/cython/test_cython.pyx
223
- - name : import & run module
224
- run : python -c 'import tests.cython.test_cython'
227
+ - name : install cython & compile pyx file
228
+ run : |
229
+ if [ "${{ matrix.cython }}" == "2" ]; then
230
+ python -m pip install "cython<3"
231
+ cythonize -i tests/cython/test_cython.pyx
232
+ elif [ "${{ matrix.cython }}" == "3" ]; then
233
+ python -m pip install "cython>=3"
234
+ cythonize --inplace tests/cython/test_cython.pyx
235
+ fi
225
236
226
- - name : install cython>=3
227
- run : python -m pip install "cython>=3"
228
- - name : compile pyx file
229
- # different cython version should trigger a re-compile, but --force just in case
230
- run : cythonize --inplace --force tests/cython/test_cython.pyx
231
237
- name : import & run module
232
238
run : python -c 'import tests.cython.test_cython'
233
239
0 commit comments