Skip to content

feat: ARM64/Graviton support (architecture input + AMI-arch validation)#56

Merged
kurok merged 1 commit into
mainfrom
feat/arm64-graviton
Jul 2, 2026
Merged

feat: ARM64/Graviton support (architecture input + AMI-arch validation)#56
kurok merged 1 commit into
mainfrom
feat/arm64-graviton

Conversation

@kurok

@kurok kurok commented Jul 2, 2026

Copy link
Copy Markdown

Closes #43 — roadmap (#49) Phase 2. Pairs with spot (#39) — Graviton spot is the deepest EC2 discount — and with the version automation (#47), which keeps both checksum sets fresh.

Context

The runtime bootstrap already picks the tarball via uname -m, and runner-checksums.js already pins both x64 and arm64 hashes (from #18#20). So the gaps were guard rails, not plumbing.

What's here

  • architecture input: x64 (default) | arm64.
  • AMI-arch fail-fast: at start, the resolved AMI's Architecture (already fetched via DescribeImages) is validated against the input. Mismatch → clear error in seconds ("AMI is x86_64 but architecture is arm64") instead of a cryptic registration timeout — this fixes today's silent-failure mode. AMI with no reported architecture → warn-and-continue.
  • Mixed-arch fallback lists rejected at config parse: every type in an ec2-instance-type list must share one arch (name heuristic) and match the architecture input. Placement and arch stay orthogonal.
  • Zero-diff default: x64 behavior and generated user-data unchanged.

Tests / build

  • matchAmiArchitecture (match/mismatch/unknown), isArmInstanceType/instanceArch (Graviton families vs Intel/AMD, incl. c7gd/im4gn/is4gen/a1/g5 edge cases), config validation (invalid arch, mixed list, arch↔type conflict). 179 tests pass (was 166). Lint clean, dist rebuilt (verify-dist green). Both arch checksums for the pinned default are already present and cross-checked by verify-runner-url.

Docs

README "Running on Graviton (arm64)" with an AL2023 arm64 AMI lookup + Graviton instance-type examples; action.yml description.

Not automated

End-to-end on a real Graviton instance is a manual checklist item (can't provision EC2 in CI): instance boots → runner registers → job runs. Generation + validation are unit-tested.

Graviton (c7g/m7g/r7g) is ~20-40% better price/performance for CI compile/test
workloads. The runtime bootstrap already selects the tarball by uname and the
checksum table already carries both arches, so the missing pieces were guard
rails, not plumbing:

- New 'architecture' input: x64 (default) | arm64.
- AMI-arch fail-fast: at start the resolved AMI's Architecture (from
  DescribeImages) is checked against the input — a mismatch (x64 AMI with
  architecture: arm64, or vice versa) fails in seconds with a clear message
  instead of a cryptic bootstrap/registration timeout. This fixes today's
  silent-failure mode for anyone pointing the action at an arm64 AMI. An AMI
  that reports no architecture warns and continues.
- Mixed-arch fallback lists rejected at config parse: all types in an
  ec2-instance-type list must share one architecture (name heuristic via
  utils.instanceArch), and must match the architecture input. Placement and
  arch stay orthogonal.
- Default x64 behavior and generated user-data are unchanged (regression).

Tests: matchAmiArchitecture matrix (match/mismatch/unknown), isArmInstanceType/
instanceArch (Graviton vs Intel/AMD families), config validation (invalid arch,
mixed list, arch/type conflict) — 179 tests total. README "Running on Graviton"
section with AL2023 arm64 AMI + instance-type examples; action.yml description.

Note: end-to-end on a real Graviton instance is a manual checklist item (can't
provision EC2 in CI); generation + validation are covered by unit tests.

Closes #43

Signed-off-by: kurok <22548029+kurok@users.noreply.github.com>
@kurok kurok merged commit 36f3318 into main Jul 2, 2026
5 checks passed
@kurok kurok deleted the feat/arm64-graviton branch July 2, 2026 19: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.

ARM64/Graviton support (architecture input, per-arch runner checksums, AMI-arch validation)

1 participant