Skip to content

CI: test Linux on aarch64 too; fix the c_char cast clippy rejects there - #27

Merged
AAyberkU merged 3 commits into
AAyberkU:mainfrom
KkelebekK:linux-arm-ci
Dec 2, 2026
Merged

AAyberkU merged 3 commits into
AAyberkU:mainfrom
KkelebekK:linux-arm-ci

Conversation

@KkelebekK

@KkelebekK KkelebekK commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Releases ship rigsem-aarch64-unknown-linux-gnu.tar.gz, but CI only builds and tests Linux on x86_64. On aarch64 main does not pass its own checks: cargo clippy --all-targets -- -D warnings fails.

error: casting to the same type is unnecessary (`u8` -> `u8`)
   --> src/platform/linux/nvml.rs:222:71
222 |     let bytes: Vec<u8> = buf.iter().take_while(|&&c| c != 0).map(|&c| c as u8).collect();

c_char is i8 on x86_64 and u8 on aarch64, so the cast is a no-op there and clippy rejects it.

Fix

  • .github/workflows/ci.yml: the Linux job is a matrix over ubuntu-latest (x86_64) and ubuntu-24.04-arm (aarch64, GitHub's hosted ARM runner, free for public repositories), fail-fast: false. Steps unchanged.
  • nvml.rs text(): c.to_ne_bytes()[0] instead of c as u8; the same byte on both architectures, no cast. New unit test c_strings_stop_at_nul_and_keep_high_bytes (bytes above 0x7f, which are negative where c_char is i8, and the NUL stop).

Tests

  • In my fork (internal PR, same workflow): first run without the nvml.rs change, aarch64 failed at clippy with the error above, x86_64 and Windows passed. Second run with it: aarch64 fmt, clippy and cargo test passed, 169 unit tests and the 13 e2e_linux tests on aarch64-unknown-linux-gnu. Windows also passed; macOS was still queued (runner capacity).
  • Locally (CachyOS, x86_64): fmt, clippy clean; 169 unit + 13 e2e_linux pass, including the NVML device test on an RTX 4070 (it reads names through text()).
  • Real aarch64 hardware: the v0.3.1 aarch64 release on a Raspberry Pi 5 (Debian 13, kernel 6.18, 8 GB): SHA-256 matches, rigsem doctor 12/13 ok (only PATH, not installed), status/status --json sane (7.9 GB, 4 threads, no supported GPU so VRAM counts as RAM; the V3D GPU is a platform device, not PCI), rigsem run of a shell loop measured 1.0 cores, exit 0. That run is also where I noticed the kind bug fixed in Kinds of shell lines: pass over tests and loop headers ([, test, for, read, case) #25.

KkelebekK and others added 3 commits December 2, 2026 11:07
@AAyberkU

AAyberkU commented Dec 2, 2026

Copy link
Copy Markdown
Owner

Thanks @KkelebekK. Reviewed: the matrix syntax is valid, ubuntu-24.04-arm is a real hosted label (free for public repos), and to_ne_bytes()[0] is right for both i8 and u8 c_char. Merging; releases now ship an aarch64 Linux binary that CI actually checks.

@AAyberkU
AAyberkU merged commit 4b64c61 into AAyberkU:main Dec 2, 2026
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