@@ -129,19 +129,29 @@ jobs:
129129 target : x86
130130 steps :
131131 - uses : actions/checkout@v4
132- # Install each CPython used by maturin -i (Windows has no manylinux shim with all Pythons) .
133- # Without 3.13/3.14 here, only the single 3.x from '3.x' plus 3.13t/3.14t were available, so
134- # cp313/cp314 wheels were missing while cp313t/cp314t were built .
132+ # Windows: install standard CPython only first, run maturin, then add 3.13t/3.14t and maturin again .
133+ # If both GIL and free-threaded are on PATH before a single maturin run, detection picks 3.13t for 3.13
134+ # and cp313/cp314 wheels are missing on win_amd64 (see https://github.com/PyO3/maturin-action/issues/313) .
135135 - uses : actions/setup-python@v5
136136 with :
137137 python-version : |
138+ 3.8
138139 3.9
139140 3.10
140141 3.11
141142 3.12
142143 3.13
143144 3.14
144145 architecture : ${{ matrix.platform.target }}
146+ - name : Configure maturin interpreters (standard CPython)
147+ shell : bash
148+ run : echo "MATURIN_INTERPRETERS_STD=3.8 3.9 3.10 3.11 3.12 3.13 3.14" >> "$GITHUB_ENV"
149+ - name : Build wheels (standard CPython)
150+ uses : PyO3/maturin-action@v1
151+ with :
152+ target : ${{ matrix.platform.target }}
153+ args : --release --out dist -i ${{ env.MATURIN_INTERPRETERS_STD }}
154+ sccache : ' true'
145155 - uses : actions/setup-python@v5
146156 id : setup_freethreaded
147157 continue-on-error : true
@@ -150,21 +160,16 @@ jobs:
150160 3.13t
151161 3.14t
152162 architecture : ${{ matrix.platform.target }}
153- - name : Configure maturin interpreters
154- shell : bash
163+ - name : Warn if free-threaded Python unavailable
164+ if : steps.setup_freethreaded.outcome != 'success'
155165 run : |
156- INTERP='3.8 3.9 3.10 3.11 3.12 3.13 3.14'
157- if [[ '${{ steps.setup_freethreaded.outcome }}' == 'success' ]]; then
158- INTERP="$INTERP 3.13t 3.14t"
159- else
160- echo '::warning::Free-threaded Python (3.13t/3.14t) unavailable from setup-python; skipping cp313t/cp314t wheels this run.'
161- fi
162- echo "MATURIN_INTERPRETERS=$INTERP" >> "$GITHUB_ENV"
163- - name : Build wheels
166+ echo '::warning::Free-threaded Python (3.13t/3.14t) unavailable from setup-python; skipping cp313t/cp314t wheels this run.'
167+ - name : Build wheels (free-threaded)
168+ if : steps.setup_freethreaded.outcome == 'success'
164169 uses : PyO3/maturin-action@v1
165170 with :
166171 target : ${{ matrix.platform.target }}
167- args : --release --out dist -i ${{ env.MATURIN_INTERPRETERS }}
172+ args : --release --out dist -i 3.13t 3.14t
168173 sccache : ' true'
169174 - name : Upload wheels
170175 uses : actions/upload-artifact@v4
0 commit comments