Skip to content
Merged
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
19 changes: 18 additions & 1 deletion .github/workflows/buildwheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,25 @@ jobs:
path: ./wheelhouse/*.whl
if-no-files-found: error

build_pyodide:
name: Build Pyodide (WebAssembly) wheels
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Build wheels
uses: pypa/cibuildwheel@v4.3.5
env:
CIBW_PLATFORM: pyodide

- uses: actions/upload-artifact@v4
with:
name: wheel-artifact-pyodide
path: ./wheelhouse/*.whl
if-no-files-found: error

upload_pypi:
needs: [build_wheels, build_sdist]
needs: [build_wheels, build_pyodide, build_sdist]
runs-on: ubuntu-latest
# Only upload to PyPI when triggered by a tag (not manual workflow_dispatch)
if: startsWith(github.ref, 'refs/tags/')
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,16 @@ jobs:

- name: Test
run: python -m pytest tests -v

pyodide:
# WebAssembly: 32-bit, no SIMD, no threads. cibuildwheel builds the
# wheels and runs the tests in Node.
name: Pyodide (WebAssembly)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Build and test
uses: pypa/cibuildwheel@v4.3.5
env:
CIBW_PLATFORM: pyodide
6 changes: 6 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ archs = ["x86_64", "universal2", "arm64"]
# are provided separately in the CI matrix, so each builds natively).
archs = ["native"]

[tool.cibuildwheel.pyodide]
# WebAssembly wheels, one per Pyodide ABI (cp313: Pyodide 0.28 and 0.29;
# cp314: Pyodide 314; cp315). In a Pyodide venv, the pytest script starts
# with a shebang to a shell script, which macOS cannot run: python -m pytest.
test-command = "python -m pytest {project}/tests -q"

[tool.cibuildwheel.windows]
# Build for 64-bit Windows (32-bit is rarely needed nowadays)
archs = ["AMD64"]
Loading