Skip to content

sentencepiece: build wheels for riscv64#165

Draft
gounthar wants to merge 3 commits into
mainfrom
sentencepiece-riscv64
Draft

sentencepiece: build wheels for riscv64#165
gounthar wants to merge 3 commits into
mainfrom
sentencepiece-riscv64

Conversation

@gounthar

Copy link
Copy Markdown
Collaborator

Adds build-sentencepiece.yml so sentencepiece riscv64 wheels build on the native ubuntu-24.04-riscv runner via cibuildwheel, and publish to the GitLab index on main.

This is the build workflow that the auto-generated #157 asks for ("No build workflow found at .github/workflows/build-sentencepiece.yml"). sentencepiece is already listed in ci_scripts/packages.txt, so no manifest change is needed here.

Shape

Mirrors build-numpy.yml:

  • checks out google/sentencepiece at the requested tag (submodules: true, the C++ core is vendored)
  • points cibuildwheel at the python/ subdirectory via package-dir, since that is where setup.py/pyproject.toml live
  • matrix: cp312, cp313, cp314, cp314t
  • publish job is gated on main and reuses the shared publish-to-gitlab action

Wheels are also tested inline: cibuildwheel installs each freshly built wheel into an isolated venv and runs the package's own pytest suite against it (CIBW_TEST_SOURCES + CIBW_TEST_COMMAND). Two files are skipped: gen_stubs_test.py imports a repo-level helper that is not part of the copied test tree, and clean_sentencepiece_test_manual.py is a manual cleanup script rather than a pytest module.

Verification

Built and tested on a native riscv64 board (BananaPi BPI-F3), cp312, cibuildwheel 4.1.0, manylinux_2_39_riscv64:

60 passed, 1 warning in 281.29s

produced sentencepiece-0.2.2-cp312-cp312-manylinux_2_39_riscv64.whl.

Refs #164

Trigger: sentencepiece:0.2.2

Refs #164

Signed-off-by: Bruno Verachten <gounthar@gmail.com>
gounthar added 2 commits July 15, 2026 14:52
Match the documented default matrix (3.11 through 3.14t); numpy's 3.12+ floor is the exception, not the rule.

Signed-off-by: Bruno Verachten <gounthar@gmail.com>
Copy python/tools alongside python/test so gen_stubs_test can import gen_stubs, and drop the ad-hoc pytest ignores to mirror upstream's 'pytest -v {project}/test'.

Signed-off-by: Bruno Verachten <gounthar@gmail.com>
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

Successfully merging this pull request may close these issues.

1 participant