feat: ARM64/Graviton support (architecture input + AMI-arch validation)#56
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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, andrunner-checksums.jsalready pins both x64 and arm64 hashes (from #18–#20). So the gaps were guard rails, not plumbing.What's here
architectureinput:x64(default) |arm64.Architecture(already fetched viaDescribeImages) 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.ec2-instance-typelist must share one arch (name heuristic) and match thearchitectureinput. Placement and arch stay orthogonal.Tests / build
matchAmiArchitecture(match/mismatch/unknown),isArmInstanceType/instanceArch(Graviton families vs Intel/AMD, incl.c7gd/im4gn/is4gen/a1/g5edge 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 byverify-runner-url.Docs
README "Running on Graviton (arm64)" with an AL2023 arm64 AMI lookup + Graviton instance-type examples;
action.ymldescription.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.