Skip to content

ci: add linux-aarch64 to the libretro cross-compile early-warning gate - #334

Merged
doublegate merged 1 commit into
mainfrom
ci/libretro-linux-aarch64-gate
Jul 30, 2026
Merged

ci: add linux-aarch64 to the libretro cross-compile early-warning gate#334
doublegate merged 1 commit into
mainfrom
ci/libretro-linux-aarch64-gate

Conversation

@doublegate

@doublegate doublegate commented Jul 30, 2026

Copy link
Copy Markdown
Owner

Summary

Adds aarch64-unknown-linux-gnu to the libretro-cross early-warning gate in ci.yml, giving PR-time CI coverage to the Linux aarch64 cross-compile that #331 ships to the GitLab buildbot.

Why

#331 adds a libretro-build-linux-aarch64 job to .gitlab-ci.yml, but a GitHub PR can't run GitLab pipelines — so that cross-compile has no pre-merge signal here. The libretro-cross gate exists precisely to close that blind spot (it was added after buildbot pipeline #91899 failed 9/10 jobs on problems reproducible in seconds on a GH runner). This extends it to the target #331 introduces.

Why no per-target step is needed

  • cargo check, not build: the gate never links, so ci: add a Linux aarch64 build #331's cross linker (aarch64-linux-gnu-gcc) and STRIP override — which only matter at link/package time — are irrelevant here.
  • bindgen resolves libretro.h from clang's freestanding builtins: the header includes only stdint.h / stddef.h / limits.h / stdbool.h. Verified with cargo check --release -p rustynes-libretro --target aarch64-unknown-linux-gnu on a host with zero aarch64 system headers installed — the whole graph (cpu/ppu/apu/mappers/core/rust-libretro/rustynes-libretro, bindgen included) compiled clean in ~3 min. So, unlike Android's bionic (which needs the NDK sysroot), the generic rustup target add + cargo check steps cover it with no extra wiring.

Relationship to #331

Companion to #331 (Linux aarch64 buildbot job by @WizzardSK). That PR is the feature; this is the CI insurance that keeps the aarch64 cross-compile green on every PR going forward. Different files, independent — merge order doesn't matter.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Expanded cross-compilation coverage to include Linux on aarch64.
    • Added the required cross-compilation headers and configuration for generating bindings on the new target.
    • Improved build workflow documentation for platform-specific sysroot and header requirements.

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 92f7a072-0886-43e1-9b88-2a1cafe2f28d

📥 Commits

Reviewing files that changed from the base of the PR and between 90c74c6 and d03f9b7.

📒 Files selected for processing (1)
  • .github/workflows/ci.yml

📝 Walkthrough

Walkthrough

The libretro-cross CI job now builds for aarch64-unknown-linux-gnu, installs the corresponding glibc cross headers, and configures bindgen with the AArch64 sysroot and include path.

Changes

Libretro AArch64 cross-build

Layer / File(s) Summary
AArch64 target and bindgen provisioning
.github/workflows/ci.yml
The matrix adds aarch64-unknown-linux-gnu; a conditional step installs gcc-aarch64-linux-gnu and exports bindgen sysroot/include arguments, with updated inline documentation.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested labels: bug

🚥 Pre-merge checks | ✅ 9
✅ Passed checks (9 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding linux-aarch64 coverage to the libretro cross-compile CI gate.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Docs-As-Spec Sync ✅ Passed Only .github/workflows/ci.yml changed; no crates/rustynes-{cpu,ppu,apu,mappers} or matching docs files were touched, so no docs sync was needed.
Changelog Entry For User-Visible Changes ✅ Passed Only .github/workflows/ci.yml changed; this is CI/tooling-only, and the Unreleased changelog section is intentionally empty.
No Unwrap/Expect/Panic On Untrusted Input ✅ Passed Only .github/workflows/ci.yml changed; no Rust code paths or new unwrap/expect/panic sites touching untrusted inputs were added.
Safety Comment On New Unsafe Blocks ✅ Passed PR only changes .github/workflows/ci.yml; no Rust source or new unsafe blocks/fns were added.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/libretro-linux-aarch64-gate

Comment @coderabbitai help to get the list of available commands.

PR #331 adds a `libretro-build-linux-aarch64` job to the GitLab buildbot
recipe, but a GitHub PR cannot run GitLab pipelines, so that cross-compile
had zero pre-merge CI coverage -- the exact blind spot the `libretro-cross`
gate exists to close (added after buildbot pipeline #91899 failed 9/10
jobs on issues reproducible in seconds on a GH runner).

Add `aarch64-unknown-linux-gnu` to the gate's matrix with a per-target
provisioning step. bindgen parses `libretro.h` under `--target aarch64`,
glibc's `stdint.h` pulls in the arch-split `bits/libc-header-start.h`, and
a stock x86_64 runner ships that header only for x86_64 -- so clang fails
with `bits/libc-header-start.h not found` (the same Debian-multiarch miss
the matrix note already documents for the excluded Apple targets).
Installing `gcc-aarch64-linux-gnu` lands `libc6-dev-arm64-cross` under
`/usr/aarch64-linux-gnu/include`; `--sysroot` plus an explicit `-isystem`
send bindgen there. Still `cargo check` only -- the cross linker that
package also provides is unused (linking is the buildbot's job).

The header requirement was surfaced by this gate itself: the aarch64 leg
failed on the runner with exactly that error, even though a local
`cargo check --target aarch64-unknown-linux-gnu` had passed -- because an
Arch dev host's glibc headers are not arch-split while the Debian-multiarch
runner's are. That divergence is precisely the blind spot the gate exists
to catch, now caught pre-merge instead of on the buildbot.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@doublegate
doublegate force-pushed the ci/libretro-linux-aarch64-gate branch from 6c4bd29 to d03f9b7 Compare July 30, 2026 04:59
@github-actions

Copy link
Copy Markdown

Antigravity review (Gemini via Ultra)

This pull request adds aarch64-unknown-linux-gnu to the cargo check CI matrix in .github/workflows/ci.yml and installs ARM64 glibc headers so bindgen can parse target headers.

Blocking issues

None found.

Suggestions

  • .github/workflows/ci.yml:424-425: Install libc6-dev-arm64-cross directly instead of gcc-aarch64-linux-gnu. The comment explicitly notes that the GCC cross-linker and binutils are unused for cargo check; installing only libc6-dev-arm64-cross with --no-install-recommends reduces CI package download overhead.

Nitpicks

  • .github/workflows/ci.yml:424: Pass --no-install-recommends to apt-get install to avoid pulling unnecessary recommended packages into the CI environment.

Automated first-pass review by agy on a self-hosted runner -- not a human review.

@doublegate
doublegate merged commit c977932 into main Jul 30, 2026
24 checks passed
@doublegate
doublegate deleted the ci/libretro-linux-aarch64-gate branch July 30, 2026 05:16
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