@@ -199,3 +199,110 @@ jobs:
199
199
source ci/upload_wheels.sh
200
200
set_upload_vars
201
201
upload_wheels
202
+
203
+ build_free_threaded_wheels :
204
+ needs : build_sdist
205
+ name : Build wheel for ${{ matrix.python }}-${{ matrix.buildplat[1] }}
206
+ if : >-
207
+ (github.event_name == 'schedule') ||
208
+ github.event_name == 'workflow_dispatch' ||
209
+ (github.event_name == 'pull_request' &&
210
+ contains(github.event.pull_request.labels.*.name, 'Build'))
211
+ runs-on : ${{ matrix.buildplat[0] }}
212
+ strategy :
213
+ fail-fast : false
214
+ matrix :
215
+ # GitHub Actions doesn't support pairing matrix values together, let's improvise
216
+ # https://github.com/github/feedback/discussions/7835#discussioncomment-1769026
217
+ buildplat :
218
+ - [ubuntu-22.04, manylinux_x86_64]
219
+ - [ubuntu-22.04, musllinux_x86_64]
220
+ - [macos-13, macosx_x86_64]
221
+ - [macos-14, macosx_arm64]
222
+ python : ["cp313t"]
223
+ env :
224
+ IS_PUSH : false
225
+ IS_SCHEDULE_DISPATCH : ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
226
+ steps :
227
+ - name : Checkout pandas
228
+ uses : actions/checkout@v4
229
+ with :
230
+ fetch-depth : 0
231
+
232
+ # TODO: Build wheels from sdist again
233
+ # There's some sort of weird race condition?
234
+ # within Github that makes the sdist be missing files
235
+
236
+ # We need to build wheels from the sdist since the sdist
237
+ # removes unnecessary files from the release
238
+ - name : Download sdist (not macOS)
239
+ # if: ${{ matrix.buildplat[1] != 'macosx_*' }}
240
+ uses : actions/download-artifact@v4
241
+ with :
242
+ name : sdist
243
+ path : ./dist
244
+
245
+ - name : Output sdist name (macOS)
246
+ id : save-path
247
+ shell : bash -el {0}
248
+ run : echo "sdist_name=$(ls ./dist)" >> "$GITHUB_ENV"
249
+
250
+ # Python version used to build sdist doesn't matter
251
+ # wheel will be built from sdist with the correct version
252
+ - name : Unzip sdist (macOS)
253
+ if : ${{ startsWith(matrix.buildplat[1], 'macosx') }}
254
+ run : |
255
+ tar -xzf ./dist/${{ env.sdist_name }} -C ./dist
256
+
257
+ - name : Output sdist name (macOS)
258
+ id : save-path2
259
+ shell : bash -el {0}
260
+ run : echo "sdist_name=$(cd ./dist && ls -d */)" >> "$GITHUB_ENV"
261
+
262
+ - name : Build wheels
263
+
264
+ with :
265
+ package-dir : ./dist/${{ startsWith(matrix.buildplat[1], 'macosx') && env.sdist_name || needs.build_sdist.outputs.sdist_file }}
266
+ env :
267
+ CIBW_PRERELEASE_PYTHONS : True
268
+ CIBW_FREE_THREADED_SUPPORT : True
269
+ CIBW_BUILD : ${{ matrix.python }}-${{ matrix.buildplat[1] }}
270
+
271
+ - name : Set up Python
272
+ uses : mamba-org/setup-micromamba@v1
273
+ with :
274
+ environment-name : wheel-env
275
+ # Use a fixed Python, since we might have an unreleased Python not
276
+ # yet present on conda-forge
277
+ create-args : >-
278
+ python=3.11
279
+ anaconda-client
280
+ wheel
281
+ cache-downloads : true
282
+ cache-environment : true
283
+
284
+ - name : Validate wheel RECORD
285
+ shell : bash -el {0}
286
+ run : for whl in $(ls wheelhouse); do wheel unpack wheelhouse/$whl -d /tmp; done
287
+
288
+ - uses : actions/upload-artifact@v4
289
+ with :
290
+ name : ${{ matrix.python }}-${{ matrix.buildplat[1] }}
291
+ path : ./wheelhouse/*.whl
292
+
293
+ - name : Upload wheels & sdist
294
+ if : ${{ success() && (env.IS_SCHEDULE_DISPATCH == 'true' || env.IS_PUSH == 'true') }}
295
+ shell : bash -el {0}
296
+ env :
297
+ PANDAS_STAGING_UPLOAD_TOKEN : ${{ secrets.PANDAS_STAGING_UPLOAD_TOKEN }}
298
+ PANDAS_NIGHTLY_UPLOAD_TOKEN : ${{ secrets.PANDAS_NIGHTLY_UPLOAD_TOKEN }}
299
+ # trigger an upload to
300
+ # https://anaconda.org/scientific-python-nightly-wheels/pandas
301
+ # for cron jobs or "Run workflow" (restricted to main branch).
302
+ # Tags will upload to
303
+ # https://anaconda.org/multibuild-wheels-staging/pandas
304
+ # The tokens were originally generated at anaconda.org
305
+ run : |
306
+ source ci/upload_wheels.sh
307
+ set_upload_vars
308
+ upload_wheels
0 commit comments