Skip to content

A setup-xbuildenv composite action? #12

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

Open
agriyakhetarpal opened this issue Sep 17, 2024 · 3 comments
Open

A setup-xbuildenv composite action? #12

agriyakhetarpal opened this issue Sep 17, 2024 · 3 comments

Comments

@agriyakhetarpal
Copy link
Member

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:

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 the cibuildwheel version (though, that may change).

@ryanking13
Copy link
Member

Sounds good to me. I would name it setup-pyodide-build.

@agriyakhetarpal
Copy link
Member Author

Agreed, that sounds better!

@joemarshall
Copy link

This is a really good idea - one thing that would be nice also would be to have an option in the same action for downloading pyodide from source and building against latest head of main branch (or whatever checkout you want), along with caching the produced build environment. This would solve the chicken/egg problem of building a new wheel to push to pyodide packages in advance of a new version of pyodide being released (pyodide/pyodide#5473 )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants