Skip to content

ci: add riscv64-linux smoke job (QEMU)#3606

Open
tobiastilhof wants to merge 1 commit intosparklemotion:mainfrom
tobiastilhof:ci-riscv64-qemu
Open

ci: add riscv64-linux smoke job (QEMU)#3606
tobiastilhof wants to merge 1 commit intosparklemotion:mainfrom
tobiastilhof:ci-riscv64-qemu

Conversation

@tobiastilhof
Copy link

This PR adds an experimental CI job that runs Nokogiri's build and test suite
on riscv64 using QEMU.

The goal is simply to verify that Nokogiri compiles and runs correctly on the
RISC-V architecture. As RISC-V systems become more accessible (e.g. development
boards and some cloud environments), having minimal CI coverage can help detect
portability issues early.

What the job does

The job:

  • runs inside a riscv64 container (ruby:3.4.x-slim)
  • installs system libraries (libxml2-dev, libxslt1-dev)
  • compiles Nokogiri using --enable-system-libraries
  • runs the test suite using the standard rake tasks

To keep runtime reasonable under QEMU emulation:

  • Bundler dependencies are cached
  • gem documentation generation is disabled
  • system libraries are used instead of building Nokogiri’s packaged libxml2

In practice this job completes in roughly ~9 minutes.

Why system libraries are used

Building Nokogiri's bundled libxml2 under QEMU emulation significantly increases
CI runtime. Using system libraries keeps the job lightweight while still
verifying that Nokogiri compiles and the test suite runs successfully.

The workflow logs also include the detected libxml2 version for visibility.

Intent

This job is meant to provide additional CI signal only

If preferred, it could be:

  • treated as experimental
  • marked continue-on-error
  • adjusted to run a smaller smoke subset of tests
  • moved to a small prebuilt container image (e.g. via GHCR) with the required system dependencies preinstalled, to avoid repeated apt-get installation and further reduce CI runtime


Happy to adjust or simplify the workflow if there are preferred conventions for adding new architectures to the CI setup.

If this isn’t something the project wants to maintain in CI long-term, feel free to close the PR — I mostly wanted to share the experiment and the workflow in case it’s useful.


Thanks for taking a look!

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.

2 participants