Skip to content

feat(cli): release for ppc64le and s390x Linux - #1281

Open
TylerJang27 wants to merge 4 commits into
mainfrom
tyler/ppc64le-s390x
Open

TylerJang27 wants to merge 4 commits into
mainfrom
tyler/ppc64le-s390x

Conversation

@TylerJang27

@TylerJang27 TylerJang27 commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator

Overview

Build and release trunk-analytics-cli for IBM Power (powerpc64le-unknown-linux-gnu) and IBM Z (s390x-unknown-linux-gnu).

Details

Both targets cross-compile with cross on ubuntu-latest, like illumos. The release adds two assets, trunk-analytics-cli-powerpc64le-unknown-linux.tar.gz and trunk-analytics-cli-s390x-unknown-linux.tar.gz, and smoke-tests each under QEMU user-mode, since GitHub has no hosted runners for either architecture. The PR workflow builds both too, so a dependency that breaks them fails on the PR rather than at release.

Considerations

  • glibc, not musl. cross has no musl image for either target, and a static glibc binary cannot resolve DNS through NSS. ldd cannot read a foreign binary, so a readelf check replaces it: the binary may link only glibc's libraries, and must need glibc 2.28 (RHEL 8) or older.
  • How each target stays at glibc 2.28.
    • ppc64le links through zig (zig = "2.28" in Cross.toml). Linked in the default cross 0.2.5 image (Ubuntu 16.04), it crashes at startup with SIGILL on glibc 2.34 and newer, so on RHEL 9 and Ubuntu 24.04. This PR's first smoke-test run caught that.
    • s390x stays on the cross 0.2.5 image. zig cannot link s390x, and that image's binary runs on every glibc tested.
  • cross pinned to a commit for these two targets. actions-rust-cross installs the latest cross release (0.2.5), which ignores zig. The action now gets cross-version: d5a5ead (cross-rs main, 2026-10-30) for *-unknown-linux-gnu only; illumos and the musl targets are unchanged.
  • Rust cache keyed per target. rust-cache keyed the build jobs by job name and OS only, so every Linux x64 row shared one target/. s390x then ran build scripts compiled for a newer glibc inside its Ubuntu 16.04 image and failed, depending on which row saved the cache first. Each target now has its own cache, which also costs every target one cold build.
  • No UPX and no CLI tools (bundle, xcresult, codeowners) for these targets. UPX cannot pack s390x. A skip-cli-tools matrix flag replaces the hard-coded illumos checks.

Testing

Built both with cross at d5a5ead (release-with-debug, as the release does) and ran the CI linkage check: ppc64le needs glibc 2.28, s390x 2.18, and both link only glibc libraries.

Then ran each binary under QEMU 8.2 (the runner's version) against the glibc of three distributions, taken from the AlmaLinux 8/9 images (RHEL 8/9 rebuilds) and Ubuntu's cross packages. Each row ran --version, an upload --dry-run, and an upload to staging with a fake token:

--version dry-run test ID staging upload
ppc64le, AlmaLinux 8 (glibc 2.28) ✅ a206284a-… ✅ 401
ppc64le, AlmaLinux 9 (glibc 2.34, POWER9) ✅ a206284a-… ✅ 401
ppc64le, Ubuntu 24.04 (glibc 2.39) ✅ a206284a-… ✅ 401
s390x, AlmaLinux 8 ✅ a206284a-… ✅ 401
s390x, AlmaLinux 9 ✅ a206284a-… ✅ 401
s390x, Ubuntu 24.04 ✅ a206284a-… ✅ 401

The identical test ID on big-endian s390x and little-endian ppc64le is evidence against a byte-order bug. Nothing has run on real Power or Z hardware.

Follow-up Work

  • analytics-uploader's platform detection: map ppc64le and s390x to the new asset names.
  • Docs download snippets for the new assets.
  • pyo3.yml still uses macos-14, which GitHub retires on 2026-11-02; its brownouts fail that job on every PR, this one included.

🤖 Generated with Claude Code

Cross-compile trunk-analytics-cli for powerpc64le-unknown-linux-gnu and
s390x-unknown-linux-gnu, smoke-test both under QEMU, and build them on
every PR. Both link glibc dynamically; Cross.toml pins the cross 0.2.5
images so the floor stays at glibc 2.22/2.18 rather than 2.39.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@trunk-io

trunk-io Bot commented Oct 30, 2026

Copy link
Copy Markdown

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

cross installs a missing target itself, so rust-toolchain.toml does not
need ppc64le and s390x. The glibc check now fails above 2.28 (RHEL 8)
instead of only logging the floor.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@trunk-staging-io

trunk-staging-io Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Static Badge   Static Badge   Static Badge

Failed Test Failure Summary Logs
pending_quarantine_test should be quarantined when run with variant A test marked as pending was expected to fail but unexpectedly passed. Logs ↗︎
variant_quarantine_test should be quarantined when run with variant The quarantine test failed because it expected 2 + 2 to equal 5, but the result was 4. Logs ↗︎

View Full Report ↗︎ ⋅ Docs

@codecov-commenter

codecov-commenter commented Oct 30, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.67%. Comparing base (4d15418) to head (f34075c).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1281      +/-   ##
==========================================
+ Coverage   85.47%   85.67%   +0.20%     
==========================================
  Files          86       86              
  Lines       19259    19259              
==========================================
+ Hits        16461    16500      +39     
+ Misses       2798     2759      -39     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

TylerJang27 and others added 2 commits October 30, 2026 22:39
Linked in the cross 0.2.5 image, the ppc64le binary dies with SIGILL at
startup on glibc 2.34 and newer (RHEL 9, Ubuntu 24.04). Link it with
zig against glibc 2.28 instead. The cross 0.2.5 release ignores the zig
setting, so the glibc targets build with cross at a pinned commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The build jobs shared one rust-cache key across every Linux x64 target,
so s390x could restore build scripts compiled for a newer glibc and run
them in its Ubuntu 16.04 image.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants