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

ci: try cibuildwheel pyodide #935

Merged
merged 10 commits into from
Jun 13, 2024
27 changes: 25 additions & 2 deletions .github/workflows/emscripten.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ jobs:

- uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.12"

- name: Install pyodide-build
run: pip install pyodide-build==0.25.1
run: pip install pyodide-build==0.26.0a6
henryiii marked this conversation as resolved.
Show resolved Hide resolved

- name: Compute emsdk version
id: compute-emsdk-version
Expand Down Expand Up @@ -65,3 +65,26 @@ jobs:
with:
name: emscripten-wheel
path: dist/*.whl

build-pyodide:
name: Pyodide cibuildwheel
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0

- uses: actions/setup-python@v5
with:
python-version: "3.12"

- uses: hoodmane/cibuildwheel@emscripten
henryiii marked this conversation as resolved.
Show resolved Hide resolved
env:
CIBW_PLATFORM: pyodide

- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: pyodide-wheel
path: wheelhouse/*.whl
9 changes: 8 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ ignore_missing_imports = true

[tool.cibuildwheel]
test-extras = "test"
test-command = "pytest --benchmark-disable {project}/tests"
test-command = "python -m pytest --benchmark-disable {project}/tests"
henryiii marked this conversation as resolved.
Show resolved Hide resolved
test-skip = [
"pp37-*",
"pp38-*",
Expand All @@ -169,6 +169,13 @@ environment-pass = ["SETUPTOOLS_SCM_PRETEND_VERSION"]
environment.PIP_ONLY_BINARY = "numpy"
environment.PIP_PREFER_BINARY = "1"

[[tool.cibuildwheel.overrides]]
select = "*pyodide*"
inherit.environment = "append"
environment.CFLAGS = "-fexceptions"
environment.LDFLAGS = "-fexceptions"
build-frontend = {name = "build", args = ["--exports", "whole_archive"]}


[tool.pylint]
py-version = "3.7"
Expand Down
Loading