Add wasm CI #6
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Build wasm wheels | |
on: | |
# Save CI by only running this on release branches or tags. | |
push: | |
branches: | |
- main | |
- v[0-9]+.[0-9]+.x | |
tags: | |
- v* | |
# Also allow running this action on PRs if requested by applying the | |
# "Run cibuildwheel" label. | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
- reopened | |
- labeled | |
permissions: | |
contents: read | |
jobs: | |
build_wasm: | |
if: >- | |
github.event_name == 'push' || | |
github.event_name == 'pull_request' && ( | |
( | |
github.event.action == 'labeled' && | |
github.event.label.name == 'CI: Run cibuildwheel' | |
) || | |
contains(github.event.pull_request.labels.*.name, | |
'CI: Run cibuildwheel') | |
) | |
name: Build wasm | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-python@v5 | |
name: Install Python | |
with: | |
python-version: '3.12' | |
- name: Build wheels for wasm | |
uses: pypa/cibuildwheel@7940a4c0e76eb2030e473a5f864f291f63ee879b # v2.21.3 | |
env: | |
CIBW_PLATFORM: "pyodide" | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: cibw-wheels-${{ runner.os }}-${{ matrix.cibw_archs }} | |
path: ./wheelhouse/*.whl | |
if-no-files-found: error |