Skip to content

CI: Upgrade to ubuntu-24.04, install Python free threading from conda-forge #61410

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/code-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ permissions:
jobs:
docstring_typing_manual_hooks:
name: Docstring validation, typing, and other manual pre-commit hooks
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
defaults:
run:
shell: bash -el {0}
Expand Down Expand Up @@ -102,7 +102,7 @@ jobs:

asv-benchmarks:
name: ASV Benchmarks
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
defaults:
run:
shell: bash -el {0}
Expand Down Expand Up @@ -133,7 +133,7 @@ jobs:

build_docker_dev_environment:
name: Build Docker Dev Environment
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
defaults:
run:
shell: bash -el {0}
Expand All @@ -160,7 +160,7 @@ jobs:

requirements-dev-text-installable:
name: Test install requirements-dev.txt
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04

concurrency:
# https://github.saobby.my.eu.orgmunity/t/concurrecy-not-work-for-push/183068/7
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ permissions:

jobs:
analyze:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
permissions:
actions: read
contents: read
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/comment-commands.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ permissions:

jobs:
issue_assign:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
if: (!github.event.issue.pull_request) && github.event.comment.body == 'take'
concurrency:
group: ${{ github.actor }}-issue-assign
Expand All @@ -19,7 +19,7 @@ jobs:
echo "Assigning issue ${{ github.event.issue.number }} to ${{ github.event.comment.user.login }}"
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
preview_docs:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
if: github.event.issue.pull_request && github.event.comment.body == '/preview'
concurrency:
group: ${{ github.actor }}-preview-docs
Expand All @@ -29,7 +29,7 @@ jobs:
previewer-server: "https://pandas.pydata.org/preview"
artifact-job: "Doc Build and Upload"
asv_run:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
# TODO: Support more benchmarking options later, against different branches, against self, etc
if: github.event.issue.pull_request && startsWith(github.event.comment.body, '@github-actions benchmark')
defaults:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deprecation-tracking-bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
deprecation_update:
permissions:
issues: write
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
env:
DEPRECATION_TRACKER_ISSUE: 56596
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docbuild-and-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ permissions:
jobs:
web_and_docs:
name: Doc Build and Upload
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04

concurrency:
# https://github.saobby.my.eu.orgmunity/t/concurrecy-not-work-for-push/183068/7
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/package-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ defaults:
jobs:
pip:
if: ${{ github.event.label.name == 'Build' || contains(github.event.pull_request.labels.*.name, 'Build') || github.event_name == 'push'}}
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
strategy:
matrix:
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"]
Expand Down Expand Up @@ -50,7 +50,7 @@ jobs:
shell: bash -el {0}
conda_forge_recipe:
if: ${{ github.event.label.name == 'Build' || contains(github.event.pull_request.labels.*.name, 'Build') || github.event_name == 'push'}}
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
strategy:
matrix:
python-version: ['3.10', '3.11']
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stale-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
permissions:
pull-requests: write
if: github.repository_owner == 'pandas-dev'
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/stale@v9
with:
Expand Down
74 changes: 18 additions & 56 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
timeout-minutes: 90
strategy:
matrix:
platform: [ubuntu-22.04, ubuntu-24.04-arm]
platform: [ubuntu-24.04, ubuntu-24.04-arm]
env_file: [actions-310.yaml, actions-311.yaml, actions-312.yaml, actions-313.yaml]
# Prevent the include jobs from overriding other jobs
pattern: [""]
Expand All @@ -36,11 +36,15 @@ jobs:
env_file: actions-311-downstream_compat.yaml
pattern: "not slow and not network and not single_cpu"
pytest_target: "pandas/tests/test_downstream.py"
platform: ubuntu-22.04
platform: ubuntu-24.04
- name: "Minimum Versions"
env_file: actions-310-minimum_versions.yaml
pattern: "not slow and not network and not single_cpu"
platform: ubuntu-22.04
platform: ubuntu-24.04
- name: "Freethreading"
env_file: actions-313-freethreading.yaml
pattern: "not slow and not network and not single_cpu"
platform: ubuntu-24.04
- name: "Locale: it_IT"
env_file: actions-311.yaml
pattern: "not slow and not network and not single_cpu"
Expand All @@ -51,7 +55,7 @@ jobs:
# Also install it_IT (its encoding is ISO8859-1) but do not activate it.
# It will be temporarily activated during tests with locale.setlocale
extra_loc: "it_IT"
platform: ubuntu-22.04
platform: ubuntu-24.04
- name: "Locale: zh_CN"
env_file: actions-311.yaml
pattern: "not slow and not network and not single_cpu"
Expand All @@ -62,30 +66,30 @@ jobs:
# Also install zh_CN (its encoding is gb2312) but do not activate it.
# It will be temporarily activated during tests with locale.setlocale
extra_loc: "zh_CN"
platform: ubuntu-22.04
platform: ubuntu-24.04
- name: "Future infer strings"
env_file: actions-312.yaml
pandas_future_infer_string: "1"
platform: ubuntu-22.04
platform: ubuntu-24.04
- name: "Future infer strings (without pyarrow)"
env_file: actions-311.yaml
pandas_future_infer_string: "1"
platform: ubuntu-22.04
platform: ubuntu-24.04
- name: "Pypy"
env_file: actions-pypy-39.yaml
pattern: "not slow and not network and not single_cpu"
test_args: "--max-worker-restart 0"
platform: ubuntu-22.04
platform: ubuntu-24.04
- name: "Numpy Dev"
env_file: actions-311-numpydev.yaml
pattern: "not slow and not network and not single_cpu"
test_args: "-W error::DeprecationWarning -W error::FutureWarning"
platform: ubuntu-22.04
platform: ubuntu-24.04
- name: "Pyarrow Nightly"
env_file: actions-311-pyarrownightly.yaml
pattern: "not slow and not network and not single_cpu"
pandas_future_infer_string: "1"
platform: ubuntu-22.04
platform: ubuntu-24.04
fail-fast: false
name: ${{ matrix.name || format('{0} {1}', matrix.platform, matrix.env_file) }}
env:
Expand Down Expand Up @@ -220,7 +224,7 @@ jobs:
uses: ./.github/actions/run-tests

Linux-32-bit:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
container:
image: quay.io/pypa/manylinux2014_i686
options: --platform linux/386
Expand Down Expand Up @@ -256,7 +260,7 @@ jobs:
cancel-in-progress: true

Linux-Musl:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
container:
image: quay.io/pypa/musllinux_1_2_x86_64
steps:
Expand Down Expand Up @@ -325,7 +329,7 @@ jobs:
fail-fast: false
matrix:
# Separate out macOS 13 and 14, since macOS 14 is arm64 only
os: [ubuntu-22.04, macOS-13, macOS-14, windows-latest]
os: [ubuntu-24.04, macOS-13, macOS-14, windows-latest]

timeout-minutes: 90

Expand Down Expand Up @@ -362,48 +366,6 @@ jobs:
- name: Run Tests
uses: ./.github/actions/run-tests

python-freethreading:
defaults:
run:
shell: bash -eou pipefail {0}
runs-on: ubuntu-22.04

timeout-minutes: 90

concurrency:
# https://github.saobby.my.eu.orgmunity/t/concurrecy-not-work-for-push/183068/7
group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-python-freethreading-dev
cancel-in-progress: true

env:
PYTEST_WORKERS: "auto"
PANDAS_CI: 1
PATTERN: "not slow and not network and not clipboard and not single_cpu"
PYTEST_TARGET: pandas

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python Free-threading Version
uses: deadsnakes/action@v3.2.0
with:
python-version: 3.13-dev
nogil: true

- name: Build Environment
run: |
python --version
python -m pip install --upgrade pip setuptools wheel numpy meson[ninja]==1.2.1 meson-python==0.13.1
python -m pip install --pre --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple cython
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
python -m pip install -ve . --no-build-isolation --no-index --no-deps -Csetup-args="--werror"
python -m pip list

- name: Run Tests
uses: ./.github/actions/run-tests

# NOTE: this job must be kept in sync with the Pyodide build job in wheels.yml
emscripten:
# Note: the Python version, Emscripten toolchain version are determined
Expand All @@ -413,7 +375,7 @@ jobs:
# The Node.js version can be determined via Pyodide:
# https://pyodide.org/en/stable/usage/index.html#node-js
name: Pyodide build
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
concurrency:
# https://github.saobby.my.eu.orgmunity/t/concurrecy-not-work-for-push/183068/7
group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-wasm
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
(github.event_name == 'pull_request' &&
contains(github.event.pull_request.labels.*.name, 'Build')) ||
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && ( ! endsWith(github.ref, 'dev0')))
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
env:
IS_PUSH: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') }}
IS_SCHEDULE_DISPATCH: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
Expand Down Expand Up @@ -92,8 +92,8 @@ jobs:
# GitHub Actions doesn't support pairing matrix values together, let's improvise
# https://github.com/github/feedback/discussions/7835#discussioncomment-1769026
buildplat:
- [ubuntu-22.04, manylinux_x86_64]
- [ubuntu-22.04, musllinux_x86_64]
- [ubuntu-24.04, manylinux_x86_64]
- [ubuntu-24.04, musllinux_x86_64]
- [ubuntu-24.04-arm, manylinux_aarch64]
- [macos-13, macosx_x86_64]
# Note: M1 images on Github Actions start from macOS 14
Expand All @@ -109,7 +109,7 @@ jobs:
# Build Pyodide wheels and upload them to Anaconda.org
# NOTE: this job is similar to the one in unit-tests.yml except for the fact
# that it uses cibuildwheel instead of a standard Pyodide xbuildenv setup.
- buildplat: [ubuntu-22.04, pyodide_wasm32]
- buildplat: [ubuntu-24.04, pyodide_wasm32]
python: ["cp312", "3.12"]
cibw_build_frontend: 'build'

Expand Down
29 changes: 29 additions & 0 deletions ci/deps/actions-313-freethreading.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: pandas-dev-313-freethreading
channels:
- conda-forge
dependencies:
- python-freethreading

# build dependencies
- setuptools
- versioneer
- meson=1.2.1
- meson-python=0.13.1

# test dependencies
- pytest>=7.3.2
- pytest-cov
- pytest-xdist>=3.4.0

# required dependencies
- python-dateutil
- numpy

# optional dependencies
- hypothesis>=6.84.0

# Move Cython to build dependencies, once they release a version that supports freethreading
- pip:
- "tzdata>=2022.7"
- "--extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple"
- "cython"
Loading