@@ -127,8 +127,62 @@ jobs:
127127 ./wheelhouse/*.tar.gz
128128
129129
130+ build_wheels_wasm :
131+ name : Build WASM/Pyodide wheels for ${{ matrix.p_ver }}
132+ runs-on : ubuntu-latest
133+ env :
134+ CIBW_BUILD : ${{ matrix.cibw_build }}
135+ # WASM/Pyodide has no SIMD/runtime CPU detection; disable optimised paths
136+ CMAKE_ARGS : " -DWITH_ZLIB_OPTIM=OFF -DWITH_OPTIM=OFF -DWITH_RUNTIME_CPU_DETECTION=OFF"
137+ CIBW_TEST_COMMAND : " pytest {project}/tests"
138+ # Pin the Pyodide version explicitly per target for reproducible builds.
139+ # cp313 stays on 0.29.3 (the version wasm.yml proves good): 0.29.4, the
140+ # cibuildwheel 4.1 default, regresses SChunk get_slice on WASM.
141+ CIBW_PYODIDE_VERSION : ${{ matrix.pyodide_version }}
142+ strategy :
143+ fail-fast : false
144+ matrix :
145+ include :
146+ # Python 3.13 -> pyemscripten_2025_0
147+ - p_ver : " 3.13"
148+ cibw_build : " cp313-*"
149+ pyodide_version : " 0.29.3"
150+ artifact_name : " wasm-pyodide-cp313"
151+ # Python 3.14 -> pyemscripten_2026_0
152+ - p_ver : " 3.14"
153+ cibw_build : " cp314-*"
154+ pyodide_version : " 314.0.0"
155+ artifact_name : " wasm-pyodide-cp314"
156+ steps :
157+ - name : Checkout repo
158+ uses : actions/checkout@v6
159+
160+ - name : Set up Python
161+ uses : actions/setup-python@v6
162+ with :
163+ python-version : ' 3.x'
164+
165+ - name : Install dependencies
166+ run : |
167+ sudo apt-get update
168+ sudo apt-get install -y cmake
169+
170+ - name : Install cibuildwheel
171+ run : pip install "cibuildwheel==4.1.*"
172+
173+ - name : Build wheels
174+ # Testing is performed automatically by cibuildwheel (via node).
175+ # platform=pyodide can only be set via the CLI flag, not an env var.
176+ run : cibuildwheel --platform pyodide
177+
178+ - uses : actions/upload-artifact@v7
179+ with :
180+ name : ${{ matrix.artifact_name }}
181+ path : ./wheelhouse/*.whl
182+
183+
130184 upload_pypi :
131- needs : [ build_wheels]
185+ needs : [ build_wheels, build_wheels_wasm ]
132186 runs-on : ubuntu-latest
133187 # Only upload wheels when tagging (typically a release)
134188 if : startsWith(github.event.ref, 'refs/tags')
0 commit comments