Skip to content

Commit 507dee3

Browse files
Get rid of if block, use cython versions in matrix string
Co-authored-by: Spencer Brown <spencerb21@live.com>
1 parent 0b31dfc commit 507dee3

File tree

1 file changed

+8
-13
lines changed

1 file changed

+8
-13
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -205,13 +205,13 @@ jobs:
205205
matrix:
206206
include:
207207
- python: '3.9' # We support running on cython 2 and 3 for 3.9
208-
cython: '2'
208+
cython: '<3' # cython 2
209209
- python: '3.9'
210-
cython: '3'
211-
- python: '3.11' # 3.11 is the last version Cy2 supports
212-
cython: '2'
213-
- python: '3.13' # We support running cython3 on 3.13
214-
cython: '3'
210+
cython: '>=3' # cython 3 (or greater)
211+
- python: '3.11' # 3.11 is the last version Cy2 supports
212+
cython: '<3' # cython 2
213+
- python: '3.13' # We support running cython3 on 3.13
214+
cython: '>=3' # cython 3 (or greater)
215215
steps:
216216
- name: Checkout
217217
uses: actions/checkout@v4
@@ -226,13 +226,8 @@ jobs:
226226

227227
- name: install cython & compile pyx file
228228
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
229+
python -m pip install "cython${{ matrix.cython }}"
230+
cythonize --inplace tests/cython/test_cython.pyx
236231
237232
- name: import & run module
238233
run: python -c 'import tests.cython.test_cython'

0 commit comments

Comments
 (0)