When writing a CI workflow for an out-of-tree build, one needs to:
Download Emscripten (and cache it),
Set up Python 3.12 and above (or those determined by pyodide-build's constraint),
Set up Node.js,
Set up a Pyodide xbuildenv, and
Activate it, and then install pytest and any extras (requirements_emscripten.txt, a list of packages, optional dependencies like [test] or [dev], etc.).
We could implement a simple composite action that just wraps all of these steps with provided inputs.
Adding such an action and adopting it across a few packages' CI configurations gives us the added benefit that Dependabot will update the version when we release a new one here. It would also be beneficial because we would handle the versions ourselves, instead of packages having to manage the requisite versions themselves, for example:
While this use case has already been covered by cibuildwheel with Pyodide support since version 2.19, it is currently not possible to modify the Pyodide version there in a clean manner since it is hard-coded and coupled with the cibuildwheel version (though, that may change).
When writing a CI workflow for an out-of-tree build, one needs to:
pyodide-build
's constraint),pytest
and any extras (requirements_emscripten.txt
, a list of packages, optional dependencies like[test]
or[dev]
, etc.).We could implement a simple composite action that just wraps all of these steps with provided inputs.
Adding such an action and adopting it across a few packages' CI configurations gives us the added benefit that Dependabot will update the version when we release a new one here. It would also be beneficial because we would handle the versions ourselves, instead of packages having to manage the requisite versions themselves, for example:
https://github.com/scikit-image/scikit-image/blob/49e7af246f65a5030ae94b4c9304bc67cb8ccbc6/.github/workflows/emscripten.yml#L23-L31 (and others).
While this use case has already been covered by
cibuildwheel
with Pyodide support since version 2.19, it is currently not possible to modify the Pyodide version there in a clean manner since it is hard-coded and coupled with thecibuildwheel
version (though, that may change).