-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Add support for ARM64 Debian packages #4728
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
Merged
Conversation
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
Allow users to build for a different architecture if they'd like. Right now, the Docker images only support amd64 and arm64, but it's possible that we could support more images in the future.
chrisd8088
approved these changes
Nov 9, 2021
Member
chrisd8088
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One question but otherwise LGTM!
Users have recently requested packages for arm64, which is an increasingly popular architecture. In addition, it is the architecture used on newer Macs and some Windows systems, which may commonly run Linux VMs or WSL. However, GitHub Actions does not support arm64 natively, so we must build in emulation. This is extraordinarily slow, so we'll build only for the latest Debian release. All Debian-based images use our Debian images, and Debian is by far the most portable mainstream Linux distribution in terms of architecture support, so the cost to add additional architectures should be extremely minimal. Users who would like versions for older releases may build their own packages with our tooling. Build these packages in both CI and for releases.
chrisd8088
added a commit
to chrisd8088/git-lfs
that referenced
this pull request
Sep 13, 2023
The --prune command-line option was added to the docker/run_dockers.bsh script in commit 4a2e96b of PR git-lfs#4104, and the --arch command-line options was added in commit 569b5ce of PR git-lfs#4728. Earlier, the REPO_HOSTNAME environment variable was removed from all the corresponding Dockerfiles in the git-lfs/build-dockers repository in commit git-lfs/build-dockers@d4c2fe6. We therefore update the docker/run_dockers.bsh script now to remove the unused REPO_HOSTNAME environment variable and document the new --prune and --arch command-line options.
chrisd8088
added a commit
to chrisd8088/git-lfs
that referenced
this pull request
Jan 25, 2025
In commit 0044d78 of PR git-lfs#4728 we added the "build-docker-cross" job both our CI and release GitHub Actions workflows in order to build Debian Linux packages of Git LFS on the ARM64 platform. We only build an ARM64 package for Debian 12 because the build process is very slow, as we have had to use the Quick Emulator (QEMU) on AMD64 (x86_64) runners. Lately, some of these CI jobs have failed due to segmentation faults reported from the gcc compiler when it attempts to compile various modules from the Go standard packages. These failures appear to be unrelated to any changes in our code, but may be due to issues with the ARM64 emulation or some other dependency. Fortunately, GitHub has recently made ARM64 Actions runners available for use in public repositories like ours: https://github.com/orgs/community/discussions/148648 This means we can simply replace our "build-docker-cross" jobs with "build-docker-arm" jobs that utilize the ARM64 runners, and which do not exhibit the same kinds of failures with the gcc compiler. The build time for these new jobs is significantly faster than the old ones which ran in emulation, to the point where it now becomes feasible for us to build a Debian 11 package as well as the Debian 12 one. (We skip building a Debian 10 package since we expect to drop support for that platform fairly soon.) We should also be able to build an RPM package for ARM64 using Rocky 9, once we make some updates to our RPM package metadata files and the corresponding Dockerfile in our git-lfs/build-dockers repository. For the time being, however, we defer these changes to future PRs.
chrisd8088
added a commit
to chrisd8088/git-lfs
that referenced
this pull request
Jan 25, 2025
In commit 0044d78 of PR git-lfs#4728 we added the "build-docker-cross" job both our CI and release GitHub Actions workflows in order to build Debian Linux packages of Git LFS on the ARM64 platform. We only build an ARM64 package for Debian 12 because the build process is very slow, as we have had to use the Quick Emulator (QEMU) on AMD64 (x86_64) runners. Lately, some of these CI jobs have failed due to segmentation faults reported from the gcc compiler when it attempts to compile various modules from the Go standard packages. These failures appear to be unrelated to any changes in our code, but may be due to issues with the ARM64 emulation or some other dependency. Fortunately, GitHub has recently made ARM64 Actions runners available for use in public repositories like ours: https://github.com/orgs/community/discussions/148648 This means we can simply replace our "build-docker-cross" jobs with "build-docker-arm" jobs that utilize the ARM64 runners, and which do not exhibit the same kinds of failures with the gcc compiler. The build time for these new jobs is significantly faster than the old ones which ran in emulation, to the point where it now becomes feasible for us to build a Debian 11 package as well as the Debian 12 one. (We skip building a Debian 10 package since we expect to drop support for that platform fairly soon.) We should also be able to build an RPM package for ARM64 using Rocky 9, once we make some updates to our RPM package metadata files and the corresponding Dockerfile in our git-lfs/build-dockers repository. For the time being, however, we defer these changes to future PRs.
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.
Users have recently requested packages for arm64, which is an increasingly popular architecture. In addition, it is the architecture used on newer Macs and some Windows systems, which may commonly run Linux VMs or WSL.
However, GitHub Actions does not support arm64 natively, so we must build in emulation. This is extraordinarily slow, so we'll build only for the latest Debian release. All Debian-based images use our Debian images, and Debian is by far the most portable mainstream Linux distribution in terms of architecture support, so the cost to add additional architectures should be extremely minimal. Users who would like versions for older releases may build their own packages with our tooling.
Build these packages in both CI and for releases.
Fixes #4546