-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Build and provide ARM64 Linux binaries #6015
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
SimplyDanny
merged 30 commits into
realm:main
from
bradleymackey:feature/linux-binary-aarch64
Aug 16, 2025
Merged
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
3cf5be1
Pipeline for building static linux binaries
bradleymackey 1def7a2
Build for arm and amd
bradleymackey 202395a
Update swift linux sdk in dockerfile
bradleymackey 87df6b6
Fix Dockerfile
bradleymackey 5625f42
Ensure that linux arm binary is uploaded as an artifact
bradleymackey d48533a
Add arm64 to arifact bundle
bradleymackey a3454cb
Hook up installables in makefile
bradleymackey d351022
Fix triple in artifact bundle
bradleymackey 7ec8765
Update build steps
SimplyDanny d983d4c
Build in PR
SimplyDanny 0abcd82
Build without SDK
SimplyDanny 7a73615
Separate runtime and builder image
SimplyDanny 93d3472
Link to specific binary
SimplyDanny c1cd18a
Use Swift 6.0.3
SimplyDanny 2731dce
Run `tree` command to check output
SimplyDanny 6ecfebd
Fix artifact pattern
SimplyDanny 5d674b3
Move artifacts for simpler archive structure
SimplyDanny 2ff42b8
Remove traces of Swift SDK
SimplyDanny 35f8313
Run regularly per schedule only
SimplyDanny 2b6e7d5
Build in PR if Docker-related files have changed
SimplyDanny e387a81
Use swiftlint_linux_* as Linux binary names
SimplyDanny 16e6089
Add changelog entry
SimplyDanny a01ccaa
Avoid explicit PR HEAD ref in workflow
SimplyDanny de0702f
Shorter workflow/job names
SimplyDanny 1409470
Try to build on ARM
SimplyDanny 273b499
Use PRs checkout ref
SimplyDanny 5b102f3
Reduce scheduled build and trigger on push
SimplyDanny 2669ac6
Simplify condition
SimplyDanny d63859a
Make both binaries executable
SimplyDanny 89032dd
Revert "Use PRs checkout ref"
SimplyDanny File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,3 +3,4 @@ | |
| !Source | ||
| !Tests | ||
| !Package.* | ||
| !tools/build-linux-release.sh | ||
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| #!/bin/bash | ||
|
|
||
| set -eo pipefail | ||
|
|
||
| pushd "$(dirname "${BASH_SOURCE[0]}")/.." > /dev/null | ||
|
|
||
| if [[ "$TARGETPLATFORM" = "linux/amd64" ]]; then | ||
| ARCH="x86_64" | ||
| STRIP_CMD="strip" | ||
| elif [[ "$TARGETPLATFORM" = "linux/arm64" ]]; then | ||
| ARCH="aarch64" | ||
| STRIP_CMD="strip" | ||
| else | ||
| echo "Unsupported target platform: $TARGETPLATFORM" | ||
| exit 1 | ||
| fi | ||
|
|
||
| BUILD_ARGS=( | ||
| --product swiftlint | ||
| --configuration release | ||
| -Xswiftc -I. | ||
| -Xswiftc -static-stdlib | ||
| -Xlinker -l_CFURLSessionInterface | ||
| -Xlinker -l_CFXMLInterface | ||
| -Xlinker -lcurl | ||
| -Xlinker -lxml2 | ||
| -Xlinker -fuse-ld=lld | ||
| -Xlinker -L/usr/lib/swift/linux | ||
| ) | ||
|
SimplyDanny marked this conversation as resolved.
|
||
|
|
||
| swift build "${BUILD_ARGS[@]}" | ||
| mv ".build/release/swiftlint" "swiftlint_linux_${ARCH}" | ||
| ${STRIP_CMD} "swiftlint_linux_${ARCH}" | ||
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
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.
Uh oh!
There was an error while loading. Please reload this page.