Skip to content

Conversation

@bk2204
Copy link
Member

@bk2204 bk2204 commented Nov 8, 2021

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

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.
@bk2204 bk2204 marked this pull request as ready for review November 9, 2021 18:41
@bk2204 bk2204 requested a review from a team November 9, 2021 18:41
Copy link
Member

@chrisd8088 chrisd8088 left a 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.
@bk2204 bk2204 merged commit 4f9c555 into git-lfs:main Nov 10, 2021
@bk2204 bk2204 deleted the arm64 branch November 10, 2021 14:04
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Publish arm64 linux packages to packagecloud

3 participants