Add support for Linux Arm64 runners - #4072
Draft
redsun82 wants to merge 2 commits into
Draft
Conversation
Recognize the linux/arm64 platform so the CodeQL CLI is accepted on Arm64 Linux runners and the native per-platform bundle codeql-bundle-linux-arm64.tar.zst is resolved, rather than falling through to the combined all-platforms gzip fallback (which deliberately omits arm64). Add ["linux", "arm64"] to the supported platforms and make the linux bundle name arch-aware. Keep the download mock faithful and cover the new arch branch with tests. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
redsun82
force-pushed
the
redsun82-linux-arm64-support
branch
from
August 4, 2026 13:32
cb3455d to
4c96123
Compare
Contributor
Author
|
@mbg or @henrymercer do you mind giving a very early quick look whether this seems sensible? We can postpone merging until we decide to go with it in the releases. Tomorrow I plan on running some tests by hand on this branch with the nightly release, so I don't mind if the first review is shallow. |
henrymercer
reviewed
Aug 4, 2026
henrymercer
left a comment
Contributor
There was a problem hiding this comment.
Looks good to start testing! Can we add a PR check based on ubuntu-24.04-arm?
Comment on lines
135
to
141
| { | ||
| platform: "darwin", | ||
| arch: "arm64", | ||
| tarSupportsZstd: true, | ||
| expectedBundleName: "codeql-bundle-osx64.tar.zst", | ||
| expectedCompressionMethod: "zstd", | ||
| }, |
Contributor
There was a problem hiding this comment.
Can you add a test for darwin x64?
Contributor
Author
There was a problem hiding this comment.
makes sense, will do!
mbg
reviewed
Aug 4, 2026
mbg
left a comment
Member
There was a problem hiding this comment.
Thanks for preparing these changes! They generally look reasonable. A few points that we'd probably want to tackle on top of them:
- Add at least one end-to-end test that runs on arm64 Linux. (This might also require updating
sync.ts) Possibly run other e2e tests on arm64 as well. - It would be nice if we could provide a useful error message if someone attempts to use an older CLI that doesn't support arm64 (e.g. by checking the release assets and provide an appropriate error message if on that platform)
- Add darwin/x64 case to linked bundle tests and disambiguate the parametrized test title by platform/arch - Reword CHANGELOG entry to clarify the CLI supports Linux Arm64 - Add a dedicated Linux Arm64 end-to-end PR check on ubuntu-24.04-arm Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 308c78bb-53a3-4877-a373-70fab87543f1
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.
The CodeQL CLI now ships native
linux-arm64artifacts, but the Action does not yet recognize that platform: it rejects the CLI as an unsupported platform/architecture combination and, even if it got past that, would resolve the wrong bundle asset. This change teaches the Action aboutlinux/arm64so it accepts the CLI and downloads the correct bundle.Approach
Two small semantic edits, plus faithful test/mock coverage:
src/cli-errors.ts- add["linux", "arm64"]toSUPPORTED_PLATFORMSsoisUnsupportedPlatform()no longer rejects it.src/setup-codeql.ts- make the linux branch ofgetCodeQLBundleName()architecture-aware, resolvingcodeql-bundle-linux-arm64.tar.zston arm64 andcodeql-bundle-linux64elsewhere. This flows automatically to the download and nightlies URL builders.Arm64 is shipped as a per-platform bundle only and is deliberately excluded from the combined all-platforms gzip (which is near the release-asset size limit), so it is important that resolution lands on the exact per-platform asset name rather than the combined-gzip fallback.
The bundle-download mock in
src/testing-utils.tswas updated to mirror the same arch logic so it stays faithful on arm64 hosts (x64 behavior is unchanged). Tests were updated accordingly: the now-supportedlinux/arm64case was removed from the unsupported-platform list insrc/cli-errors.test.ts, andsrc/setup-codeql.test.tsgained an explicitarchper case plus a newlinux/arm64case.x64, macOS, and Windows behavior is unchanged; the only new behavior is on Linux arm64 runners, which do not work at all today.
Risk assessment
For internal use only. Please select the risk level of this change:
Which use cases does this change impact?
Workflow types:
dynamicworkflows (Default Setup, Code Quality, ...).Products:
analysis-kinds: code-scanning.analysis-kinds: code-quality.Environments:
github.comand/or GitHub Enterprise Cloud with Data Residency.Only relevant when running on a Linux arm64 runner; other architectures are unaffected.
How did/will you validate this change?
.test.tsfiles) for the new arch branch and platform-support change.If something goes wrong after this change is released, what are the mitigation and rollback strategies?
How will you know if something goes wrong after this change is released?
Are there any special considerations for merging or releasing this change?
codeql-bundle-linux-arm64.tar.zstasset. It should only be merged once that asset is being produced.Merge / deployment checklist