Add Pixi workflow to verify Pyodide build works#1449
Add Pixi workflow to verify Pyodide build works#1449IvanIsCoding wants to merge 53 commits intoQiskit:mainfrom
Conversation
Pull Request Test Coverage Report for Build 21499831342Details
💛 - Coveralls |
|
Emscripten 4.0.9 seems to be broken with binaryen, I'll need to investigate. It's a shame because I wanted to bump Pyodide such that we can test with the Pyodide shipped by uv |
|
Looks like uv might support a version compiled |
mtreinish
left a comment
There was a problem hiding this comment.
Sorry this took me so long to follow up on. This looks good to me, it exciting to see a workflow for building pyodide in CI. I just had a couple of questions inline. I wasn't able to get pixi working locally and I'm wondering if something went stale while this was waiting on my review.
| At the root of the directory, simply run: | ||
|
|
||
| ```bash | ||
| pixi run build_pyodide |
There was a problem hiding this comment.
When I run this locally I first got an issue about the emcc -v call failing, when I set the env var to skip the version check it errors during the build with:
error: linking with `emcc` failed: exit status: 1
|
= note: "emcc" "-s" "EXPORTED_FUNCTIONS=[\"_PyInit_generators\",\"_PyInit_rustworkx\"]" "<1 object files omitted>" "/home/mtreinish/git/qiskit/retworkx/target/wasm32-unknown-emscripten/release/deps/{libcompiler_builtins-ee68dc841fe2a394.rlib}.rlib" "-B<sysroot>/lib/rustlib/x86_64-unknown-linux-gnu/bin/gcc-ld" "--target=wasm32-unknown-emscripten" "-sDISABLE_EXCEPTION_CATCHING=0" "-o" "/home/mtreinish/git/qiskit/retworkx/target/wasm32-unknown-emscripten/release/deps/rustworkx.wasm" "-O3" "-g0" "-sSIDE_MODULE=2" "-sWASM_BIGINT" "-sSIDE_MODULE=2" "-sWASM_BIGINT" "-sABORTING_MALLOC=0" "-sWASM_BIGINT"
= note: some arguments are omitted. use `--verbose` to show all linker arguments
= note: Traceback (most recent call last):
File "/home/mtreinish/git/qiskit/retworkx/.pixi/envs/default/bin/emcc", line 23, in <module>
from tools.toolchain_profiler import ToolchainProfiler
ModuleNotFoundError: No module named 'tools'
There was a problem hiding this comment.
So I have not been able to reproduce this. I tested on Linux locally, Mac locally, and on CI.
If you tell me the workaround you used, I can add it to pyproject.toml or at least mention it in CONTRIBUTING.md
Follow up of #1447
This uses pixi to run the Pyodide build. This is still higly experimental. It is related to #1416 and #1420 in the sense that pixi is to conda what uv is to pypi.
The Github Action workflow I created does the following:
RUSTC_BOOTSTRAPtrick to enable nightly features on a compiler. Of course that is terrible, but the version is pinned so essentially it is like using a pinned nightly compilerTests are included in #1450