Skip to content

Commit b2b2d04

Browse files
mroeschkelithomas1
andauthored
CI: Upgrade to ubuntu-24.04, install Python free threading from conda-forge (#61410)
* Upgrade to ubuntu-24.04, add config for free threading * Comment out matplotlib, move to a specific build * Remove all optional dependencies * Install setuptools? * bump meson/meson-python * Update unit-tests.yml * Update action.yml * Update action.yml * Update actions-313-freethreading.yaml --------- Co-authored-by: Thomas Li <[email protected]>
1 parent 29e0146 commit b2b2d04

11 files changed

+73
-75
lines changed

.github/actions/build_pandas/action.yml

+5-2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ inputs:
44
editable:
55
description: Whether to build pandas in editable mode (default true)
66
default: true
7+
werror:
8+
description: Enable werror flag for build
9+
default: true
710
runs:
811
using: composite
912
steps:
@@ -26,9 +29,9 @@ runs:
2629
run: |
2730
if [[ ${{ inputs.editable }} == "true" ]]; then
2831
pip install -e . --no-build-isolation -v --no-deps \
29-
-Csetup-args="--werror"
32+
${{ inputs.werror == 'true' && '-Csetup-args="--werror"' || '' }}
3033
else
3134
pip install . --no-build-isolation -v --no-deps \
32-
-Csetup-args="--werror"
35+
${{ inputs.werror == 'true' && '-Csetup-args="--werror"' || '' }}
3336
fi
3437
shell: bash -el {0}

.github/workflows/code-checks.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ permissions:
2121
jobs:
2222
docstring_typing_manual_hooks:
2323
name: Docstring validation, typing, and other manual pre-commit hooks
24-
runs-on: ubuntu-22.04
24+
runs-on: ubuntu-24.04
2525
defaults:
2626
run:
2727
shell: bash -el {0}
@@ -102,7 +102,7 @@ jobs:
102102

103103
asv-benchmarks:
104104
name: ASV Benchmarks
105-
runs-on: ubuntu-22.04
105+
runs-on: ubuntu-24.04
106106
defaults:
107107
run:
108108
shell: bash -el {0}
@@ -133,7 +133,7 @@ jobs:
133133
134134
build_docker_dev_environment:
135135
name: Build Docker Dev Environment
136-
runs-on: ubuntu-22.04
136+
runs-on: ubuntu-24.04
137137
defaults:
138138
run:
139139
shell: bash -el {0}
@@ -160,7 +160,7 @@ jobs:
160160

161161
requirements-dev-text-installable:
162162
name: Test install requirements-dev.txt
163-
runs-on: ubuntu-22.04
163+
runs-on: ubuntu-24.04
164164

165165
concurrency:
166166
# https://github.community/t/concurrecy-not-work-for-push/183068/7

.github/workflows/codeql.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ permissions:
1313

1414
jobs:
1515
analyze:
16-
runs-on: ubuntu-22.04
16+
runs-on: ubuntu-24.04
1717
permissions:
1818
actions: read
1919
contents: read

.github/workflows/comment-commands.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ permissions:
1010

1111
jobs:
1212
issue_assign:
13-
runs-on: ubuntu-22.04
13+
runs-on: ubuntu-24.04
1414
if: (!github.event.issue.pull_request) && github.event.comment.body == 'take'
1515
concurrency:
1616
group: ${{ github.actor }}-issue-assign
@@ -19,7 +19,7 @@ jobs:
1919
echo "Assigning issue ${{ github.event.issue.number }} to ${{ github.event.comment.user.login }}"
2020
curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -d '{"assignees": ["${{ github.event.comment.user.login }}"]}' https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/assignees
2121
preview_docs:
22-
runs-on: ubuntu-22.04
22+
runs-on: ubuntu-24.04
2323
if: github.event.issue.pull_request && github.event.comment.body == '/preview'
2424
concurrency:
2525
group: ${{ github.actor }}-preview-docs
@@ -29,7 +29,7 @@ jobs:
2929
previewer-server: "https://pandas.pydata.org/preview"
3030
artifact-job: "Doc Build and Upload"
3131
asv_run:
32-
runs-on: ubuntu-22.04
32+
runs-on: ubuntu-24.04
3333
# TODO: Support more benchmarking options later, against different branches, against self, etc
3434
if: github.event.issue.pull_request && startsWith(github.event.comment.body, '@github-actions benchmark')
3535
defaults:

.github/workflows/deprecation-tracking-bot.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
deprecation_update:
1818
permissions:
1919
issues: write
20-
runs-on: ubuntu-22.04
20+
runs-on: ubuntu-24.04
2121
env:
2222
DEPRECATION_TRACKER_ISSUE: 56596
2323
steps:

.github/workflows/docbuild-and-upload.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ permissions:
2323
jobs:
2424
web_and_docs:
2525
name: Doc Build and Upload
26-
runs-on: ubuntu-22.04
26+
runs-on: ubuntu-24.04
2727

2828
concurrency:
2929
# https://github.community/t/concurrecy-not-work-for-push/183068/7

.github/workflows/package-checks.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ defaults:
2121
jobs:
2222
pip:
2323
if: ${{ github.event.label.name == 'Build' || contains(github.event.pull_request.labels.*.name, 'Build') || github.event_name == 'push'}}
24-
runs-on: ubuntu-22.04
24+
runs-on: ubuntu-24.04
2525
strategy:
2626
matrix:
2727
extra: ["test", "pyarrow", "performance", "computation", "fss", "aws", "gcp", "excel", "parquet", "feather", "hdf5", "spss", "postgresql", "mysql", "sql-other", "html", "xml", "plot", "output-formatting", "clipboard", "compression", "all"]
@@ -50,7 +50,7 @@ jobs:
5050
shell: bash -el {0}
5151
conda_forge_recipe:
5252
if: ${{ github.event.label.name == 'Build' || contains(github.event.pull_request.labels.*.name, 'Build') || github.event_name == 'push'}}
53-
runs-on: ubuntu-22.04
53+
runs-on: ubuntu-24.04
5454
strategy:
5555
matrix:
5656
python-version: ['3.10', '3.11']

.github/workflows/stale-pr.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
permissions:
1313
pull-requests: write
1414
if: github.repository_owner == 'pandas-dev'
15-
runs-on: ubuntu-22.04
15+
runs-on: ubuntu-24.04
1616
steps:
1717
- uses: actions/stale@v9
1818
with:

.github/workflows/unit-tests.yml

+21-56
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
timeout-minutes: 90
2727
strategy:
2828
matrix:
29-
platform: [ubuntu-22.04, ubuntu-24.04-arm]
29+
platform: [ubuntu-24.04, ubuntu-24.04-arm]
3030
env_file: [actions-310.yaml, actions-311.yaml, actions-312.yaml, actions-313.yaml]
3131
# Prevent the include jobs from overriding other jobs
3232
pattern: [""]
@@ -36,11 +36,15 @@ jobs:
3636
env_file: actions-311-downstream_compat.yaml
3737
pattern: "not slow and not network and not single_cpu"
3838
pytest_target: "pandas/tests/test_downstream.py"
39-
platform: ubuntu-22.04
39+
platform: ubuntu-24.04
4040
- name: "Minimum Versions"
4141
env_file: actions-310-minimum_versions.yaml
4242
pattern: "not slow and not network and not single_cpu"
43-
platform: ubuntu-22.04
43+
platform: ubuntu-24.04
44+
- name: "Freethreading"
45+
env_file: actions-313-freethreading.yaml
46+
pattern: "not slow and not network and not single_cpu"
47+
platform: ubuntu-24.04
4448
- name: "Locale: it_IT"
4549
env_file: actions-311.yaml
4650
pattern: "not slow and not network and not single_cpu"
@@ -51,7 +55,7 @@ jobs:
5155
# Also install it_IT (its encoding is ISO8859-1) but do not activate it.
5256
# It will be temporarily activated during tests with locale.setlocale
5357
extra_loc: "it_IT"
54-
platform: ubuntu-22.04
58+
platform: ubuntu-24.04
5559
- name: "Locale: zh_CN"
5660
env_file: actions-311.yaml
5761
pattern: "not slow and not network and not single_cpu"
@@ -62,30 +66,30 @@ jobs:
6266
# Also install zh_CN (its encoding is gb2312) but do not activate it.
6367
# It will be temporarily activated during tests with locale.setlocale
6468
extra_loc: "zh_CN"
65-
platform: ubuntu-22.04
69+
platform: ubuntu-24.04
6670
- name: "Future infer strings"
6771
env_file: actions-312.yaml
6872
pandas_future_infer_string: "1"
69-
platform: ubuntu-22.04
73+
platform: ubuntu-24.04
7074
- name: "Future infer strings (without pyarrow)"
7175
env_file: actions-311.yaml
7276
pandas_future_infer_string: "1"
73-
platform: ubuntu-22.04
77+
platform: ubuntu-24.04
7478
- name: "Pypy"
7579
env_file: actions-pypy-39.yaml
7680
pattern: "not slow and not network and not single_cpu"
7781
test_args: "--max-worker-restart 0"
78-
platform: ubuntu-22.04
82+
platform: ubuntu-24.04
7983
- name: "Numpy Dev"
8084
env_file: actions-311-numpydev.yaml
8185
pattern: "not slow and not network and not single_cpu"
8286
test_args: "-W error::DeprecationWarning -W error::FutureWarning"
83-
platform: ubuntu-22.04
87+
platform: ubuntu-24.04
8488
- name: "Pyarrow Nightly"
8589
env_file: actions-311-pyarrownightly.yaml
8690
pattern: "not slow and not network and not single_cpu"
8791
pandas_future_infer_string: "1"
88-
platform: ubuntu-22.04
92+
platform: ubuntu-24.04
8993
fail-fast: false
9094
name: ${{ matrix.name || format('{0} {1}', matrix.platform, matrix.env_file) }}
9195
env:
@@ -165,6 +169,9 @@ jobs:
165169
- name: Build Pandas
166170
id: build
167171
uses: ./.github/actions/build_pandas
172+
with:
173+
# xref https://github.com/cython/cython/issues/6870
174+
werror: ${{ matrix.name != 'Freethreading' }}
168175
# TODO: Re-enable once Pypy has Pypy 3.10 on conda-forge
169176
if: ${{ matrix.name != 'Pypy' }}
170177

@@ -220,7 +227,7 @@ jobs:
220227
uses: ./.github/actions/run-tests
221228

222229
Linux-32-bit:
223-
runs-on: ubuntu-22.04
230+
runs-on: ubuntu-24.04
224231
container:
225232
image: quay.io/pypa/manylinux2014_i686
226233
options: --platform linux/386
@@ -258,7 +265,7 @@ jobs:
258265
cancel-in-progress: true
259266

260267
Linux-Musl:
261-
runs-on: ubuntu-22.04
268+
runs-on: ubuntu-24.04
262269
container:
263270
image: quay.io/pypa/musllinux_1_2_x86_64
264271
steps:
@@ -327,7 +334,7 @@ jobs:
327334
fail-fast: false
328335
matrix:
329336
# Separate out macOS 13 and 14, since macOS 14 is arm64 only
330-
os: [ubuntu-22.04, macOS-13, macOS-14, windows-latest]
337+
os: [ubuntu-24.04, macOS-13, macOS-14, windows-latest]
331338

332339
timeout-minutes: 90
333340

@@ -364,48 +371,6 @@ jobs:
364371
- name: Run Tests
365372
uses: ./.github/actions/run-tests
366373

367-
python-freethreading:
368-
defaults:
369-
run:
370-
shell: bash -eou pipefail {0}
371-
runs-on: ubuntu-22.04
372-
373-
timeout-minutes: 90
374-
375-
concurrency:
376-
# https://github.community/t/concurrecy-not-work-for-push/183068/7
377-
group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-python-freethreading-dev
378-
cancel-in-progress: true
379-
380-
env:
381-
PYTEST_WORKERS: "auto"
382-
PANDAS_CI: 1
383-
PATTERN: "not slow and not network and not clipboard and not single_cpu"
384-
PYTEST_TARGET: pandas
385-
386-
steps:
387-
- uses: actions/checkout@v4
388-
with:
389-
fetch-depth: 0
390-
391-
- name: Set up Python Free-threading Version
392-
uses: deadsnakes/[email protected]
393-
with:
394-
python-version: 3.13-dev
395-
nogil: true
396-
397-
- name: Build Environment
398-
run: |
399-
python --version
400-
python -m pip install --upgrade pip setuptools wheel numpy meson[ninja]==1.2.1 meson-python==0.13.1
401-
python -m pip install --pre --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple cython
402-
python -m pip install versioneer[toml] python-dateutil pytz tzdata hypothesis>=6.84.0 pytest>=7.3.2 pytest-xdist>=3.4.0 pytest-cov
403-
python -m pip install -ve . --no-build-isolation --no-index --no-deps -Csetup-args="--werror"
404-
python -m pip list
405-
406-
- name: Run Tests
407-
uses: ./.github/actions/run-tests
408-
409374
# NOTE: this job must be kept in sync with the Pyodide build job in wheels.yml
410375
emscripten:
411376
# Note: the Python version, Emscripten toolchain version are determined
@@ -415,7 +380,7 @@ jobs:
415380
# The Node.js version can be determined via Pyodide:
416381
# https://pyodide.org/en/stable/usage/index.html#node-js
417382
name: Pyodide build
418-
runs-on: ubuntu-22.04
383+
runs-on: ubuntu-24.04
419384
concurrency:
420385
# https://github.community/t/concurrecy-not-work-for-push/183068/7
421386
group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-wasm

.github/workflows/wheels.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
(github.event_name == 'pull_request' &&
4141
contains(github.event.pull_request.labels.*.name, 'Build')) ||
4242
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && ( ! endsWith(github.ref, 'dev0')))
43-
runs-on: ubuntu-22.04
43+
runs-on: ubuntu-24.04
4444
env:
4545
IS_PUSH: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') }}
4646
IS_SCHEDULE_DISPATCH: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
@@ -92,8 +92,8 @@ jobs:
9292
# GitHub Actions doesn't support pairing matrix values together, let's improvise
9393
# https://github.com/github/feedback/discussions/7835#discussioncomment-1769026
9494
buildplat:
95-
- [ubuntu-22.04, manylinux_x86_64]
96-
- [ubuntu-22.04, musllinux_x86_64]
95+
- [ubuntu-24.04, manylinux_x86_64]
96+
- [ubuntu-24.04, musllinux_x86_64]
9797
- [ubuntu-24.04-arm, manylinux_aarch64]
9898
- [macos-13, macosx_x86_64]
9999
# Note: M1 images on Github Actions start from macOS 14
@@ -109,7 +109,7 @@ jobs:
109109
# Build Pyodide wheels and upload them to Anaconda.org
110110
# NOTE: this job is similar to the one in unit-tests.yml except for the fact
111111
# that it uses cibuildwheel instead of a standard Pyodide xbuildenv setup.
112-
- buildplat: [ubuntu-22.04, pyodide_wasm32]
112+
- buildplat: [ubuntu-24.04, pyodide_wasm32]
113113
python: ["cp312", "3.12"]
114114
cibw_build_frontend: 'build'
115115

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: pandas-dev-313-freethreading
2+
channels:
3+
- conda-forge
4+
dependencies:
5+
- python-freethreading
6+
7+
# build dependencies
8+
- setuptools
9+
- versioneer
10+
- meson=1.8.0
11+
- meson-python=0.18.0
12+
13+
# test dependencies
14+
- pytest>=7.3.2
15+
- pytest-xdist>=3.4.0
16+
17+
# required dependencies
18+
- python-dateutil
19+
- numpy
20+
21+
# optional dependencies
22+
- hypothesis>=6.84.0
23+
24+
# Move Cython to build dependencies, once they release a version that supports freethreading
25+
- pip:
26+
# No free-threaded coveragepy (with the C-extension) on conda-forge yet
27+
- pytest-cov
28+
- "tzdata>=2022.7"
29+
- "--extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple"
30+
- "cython"

0 commit comments

Comments
 (0)