Skip to content

ci: test cross compiled natives on native runners - #267

Merged
devopvoid merged 6 commits into
devopvoid:mainfrom
SendableMetatype:feature/native-test-lanes
Sep 6, 2026
Merged

ci: test cross compiled natives on native runners#267
devopvoid merged 6 commits into
devopvoid:mainfrom
SendableMetatype:feature/native-test-lanes

Conversation

@SendableMetatype

Copy link
Copy Markdown
Contributor

The linux_arm and linux_arm64 lanes cross-compile on x86_64 runners and skip their tests, since the binaries can't run on the build host. That means no CI has ever actually loaded those natives. This PR runs them on native ARM runners, and along the way makes the Linux natives load on hosts without PulseAudio.

The two lanes now upload the classifier jar they built as a workflow artifact. A test-natives job downloads that exact jar onto an ubuntu-22.04-arm runner, installs it into the local repository, and runs the webrtc module's test suite against it with the platform's profile. What gets tested is the artifact a release would publish, not a rebuild. The arm64 entry uses Temurin; the 32-bit entry runs on the same arm64 runner with a Liberica armv7 JDK. Both entries install the runtime libraries the natives link against, the 32-bit one their armhf variants. The composite action is generic, so adding another cross-compiled platform is one matrix entry and one upload step.

The Linux natives linked libpulse at link time, so they failed to load on any host without it, which includes most headless servers and containers. This PR includes three commits by Joshua Castle (Kas-tle), who maintains a downstream fork of this library, kept under his authorship (one trimmed to its header change, since the rest of that commit was fork-specific CI): they open libpulse at runtime and bind the symbols with dlsym. The library now loads without PulseAudio; a host that lacks it gets a Java exception only when it enumerates audio devices, which matches the behavior on a host without a running PulseAudio server. The test runners deliberately don't install PulseAudio, so the lanes verify this on every run. The other link-time dependencies stay as they are: libudev and libdbus from this library, and the X11, GLib, GBM and libdrm set that libwebrtc's desktop capturers reference directly since 0.16.0.

Validation on my fork: this run. Both native lanes ran the full 122-test suite with zero failures and no libpulse on the runner, the natives built in that run no longer list libpulse.so.0 in their dynamic dependencies, and all existing platforms built as before. The run also carries #266 and a Windows ARM64 test lane built the same way, plus a small test timeout change I'll submit separately, which is why it shows ten jobs.

SendableMetatype and others added 6 commits September 5, 2026 16:22
The linux_arm and linux_arm64 lanes skip their tests, because the
natives cannot run on the x86_64 build host. Until now, no CI run
loaded those natives.

The two lanes now upload the classifier jar that they produced. A test
job on an arm64 runner downloads that exact jar, installs it into the
local repository, and runs the test suite of the webrtc module against
it. The 32-bit lane uses a Liberica armv7 JDK and the armhf runtime
libraries that the natives require. The composite action is generic,
so a further cross compiled platform only needs a matrix entry.
Signed-off-by: Joshua Castle <[email protected]>
The natives now open libpulse at runtime, so the test runners do not
install libpulse. A test lane that passes on a host without PulseAudio
proves that the natives load on minimal systems.
The Wayland and PipeWire desktop capture in 0.16.0 links gio, gbm and
libdrm directly and added Xext, Xdamage and Xtst to the X11 set. The
natives need those libraries at load time, so the test runners install
them, in the armhf variants for the 32-bit lane.
@devopvoid
devopvoid merged commit c3cc2e7 into devopvoid:main Sep 6, 2026
9 checks passed
@SendableMetatype
SendableMetatype deleted the feature/native-test-lanes branch September 6, 2026 12:26
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.

3 participants