Conversation
The checkout's pyproject.toml requires poetry with no build-backend, so cibuildwheel's PEP 517 frontend tried to install the whole poetry dependency tree (including cryptography, which needs Rust to build from source and has no riscv64 wheel). Build the sdist ourselves with `setup.py sdist`, which bypasses pyproject.toml entirely, matching how upstream's own MANIFEST.in excludes it from the released sdist.
CIBW_TEST_SOURCES resolves relative to the host's cwd at cibuildwheel invocation time; the test-file artifact wasn't landing there reliably on the self-hosted riscv64 runner. Sparse-checking out test_quickjs.py directly (as build-cryptography.yml already does for its own tests) is the same mechanism every other build-from-checkout port in this repo already relies on.
actions/checkout defaults to clean: true, running git clean -ffdx on the whole workspace rather than just repo-tracked paths. With the download step first, the later test-suite checkout wiped dist/ before cibuildwheel could read the sdist, failing every matrix leg with FileNotFoundError.
cibuildwheel extracts a .tar.gz package-dir into its own temp directory and chdir's the whole build_in_directory() call into it, including the CIBW_TEST_SOURCES copy that resolves paths against Path.cwd(). With a bare tarball package-dir, that cwd is never $GITHUB_WORKSPACE, so test_quickjs.py (checked out at the workspace root) was reported missing at test time on every leg that got past the sdist download. Extract the sdist ourselves and point package-dir at the resulting directory, matching build-lightgbm.yml's existing pattern, so cwd stays at the workspace root for the whole build.
…reference The vendored quickjs engine's default 256 KiB JS-recursion stack budget assumes a small C stack frame per JS_CallInternal call; on riscv64 that frame is large enough that the test's very first assertion, f(100) == 100, already exceeds it. On glibc that surfaces as a caught quickjs.StackOverflow where the test expects success; on musl (smaller default pthread stack) the process segfaults outright. Every matrix leg reproduced this identically once the sdist/test-file visibility issues were fixed, confirming it as a genuine riscv64 C stack-frame-size gap in the vendored engine rather than a packaging defect. Skip the one test via a patch, matching the gotcha-243 IPv6 precedent of deselecting the specific node rather than disabling a whole feature. Also corrects a leftover 'gotcha 246' comment reference to the actual assigned number (251), from before the shared skill file settled.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
quickjs1.19.4Thin Python wrapper (C extension) around the vendored QuickJS Javascript engine. Upstream publishes no riscv64 wheel.
Mirrors upstream's
build-linuxjob.Differs from upstream
Testing
test_quickjs.pyunittest suite, staged viatest-sourcesto avoid the checkout'squickjs/package shadowing the installed wheel.License: OK
Built on cp312; 72 passed.