Skip to content
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

BLD, CI: Use cibuildwheel to build Emscripten/Pyodide wheels, push nightlies to Anaconda.org #58647

Merged
merged 20 commits into from
Jul 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
6b3e0b4
BLD: Add note about keeping jobs in sync
agriyakhetarpal May 8, 2024
9833af6
BLD, CI: Upload Emscripten wheels nightly to Anaconda
agriyakhetarpal May 8, 2024
856904d
Add configuration for `cibuildwheel`-Pyodide
agriyakhetarpal May 30, 2024
7b3b68c
Use unreleased `cibuildwheel` in wheels CI job
agriyakhetarpal May 30, 2024
fc6c327
Temporarily move config from TOML to env vars
agriyakhetarpal May 30, 2024
8628801
Rename job, to match update comment
agriyakhetarpal May 30, 2024
6eb56d8
Try out Pyodide 0.26.1
agriyakhetarpal Jun 8, 2024
f5fc8d7
Move Pyodide configuration to `pyproject.toml`
agriyakhetarpal Jun 11, 2024
df24ce9
Use cibuildwheel v2.19 + clean up workflow
agriyakhetarpal Jun 11, 2024
d6e4259
Skip a test that uses subprocesses
agriyakhetarpal Jun 11, 2024
5aa5401
Match tests args with other Pyodide tests; use `not single_cpu`
agriyakhetarpal Jun 11, 2024
e25d62d
Bump to cibuildwheel version 2.19.1
agriyakhetarpal Jun 13, 2024
13d2f0e
Merge branch 'main' into upload-emscripten-wheels
agriyakhetarpal Jul 10, 2024
3fb0832
Don't add `cp312` in job name
agriyakhetarpal Jul 10, 2024
10007f0
Don't use separate job for Pyodide wheels
agriyakhetarpal Jul 12, 2024
57913d8
Fix matrix inclusion
agriyakhetarpal Jul 12, 2024
099ed28
Add separate step, set `CIBW_PLATFORM` to Pyodide
agriyakhetarpal Jul 12, 2024
04cee9a
Add condition for non-Pyodide jobs
agriyakhetarpal Jul 12, 2024
8779d87
Use just one step, inherit `CIBW_PLATFORM` if not set
agriyakhetarpal Jul 12, 2024
5106edd
Remove condition that skips the step
agriyakhetarpal Jul 12, 2024
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
1 change: 1 addition & 0 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,7 @@ jobs:
env:
PYTHON_GIL: 0

# 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
# by the Pyodide version. The appropriate versions can be found in the
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,13 @@ jobs:
- [windows-2022, win_amd64]
# TODO: support PyPy?
python: [["cp310", "3.10"], ["cp311", "3.11"], ["cp312", "3.12"]]

# 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.
include:
- buildplat: [ubuntu-22.04, pyodide_wasm32]
python: ["cp312", "3.12"]
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 @@ -146,6 +153,7 @@ jobs:
env:
CIBW_PRERELEASE_PYTHONS: True
CIBW_BUILD: ${{ matrix.python[0] }}-${{ matrix.buildplat[1] }}
CIBW_PLATFORM: ${{ matrix.buildplat[1] == 'pyodide_wasm32' && 'pyodide' || 'auto' }}

- name: Set up Python
uses: mamba-org/setup-micromamba@v1
Expand Down
3 changes: 3 additions & 0 deletions pandas/tests/test_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
import numpy as np
import pytest

from pandas.compat import WASM

import pandas as pd
from pandas import Series
import pandas._testing as tm
Expand Down Expand Up @@ -233,6 +235,7 @@ def test_temp_setattr(with_exception):
assert ser.name == "first"


@pytest.mark.skipif(WASM, reason="Can't start subprocesses in WASM")
@pytest.mark.single_cpu
def test_str_size():
# GH#21758
Expand Down
10 changes: 10 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,16 @@ test-command = ""
select = "*-macosx*"
environment = {CFLAGS="-g0"}

[[tool.cibuildwheel.overrides]]
select = "*pyodide*"
test-requires = "pytest>=7.3.2 hypothesis>=6.46.1"
# Pyodide repairs wheels on its own, using auditwheel-emscripten
repair-wheel-command = ""
test-command = """
PANDAS_CI='1' python -c 'import pandas as pd; \
pd.test(extra_args=["-m not clipboard and not single_cpu and not slow and not network and not db", "--no-strict-data-files"]);' \
"""

[tool.ruff]
line-length = 88
target-version = "py310"
Expand Down
Loading