Skip to content
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

Add ARM64, ARM32, and x86 Linux Builds #414

Merged
merged 3 commits into from
Mar 15, 2023

Conversation

theofficialgman
Copy link
Contributor

@theofficialgman theofficialgman commented Feb 18, 2023

Uses cross compilation to build and publish ARM32 and ARM64 linux builds. Successful action run here: https://github.com/theofficialgman/dugite-native/actions/runs/4213237492

The builds are very fast 🔥, equal to the speed of x64 linux or faster sometimes.

Spiritual successor to #330
Fixes #315
Replacement for #368
Closes #158
Closes desktop/dugite#521
progress for shiftkey/desktop#251

in tandum with desktop/dugite#522

Necessary for @shiftkey linux github desktop ARM and ARM64 builds in CI

LGTM!

Copy link
Member

@sergiou87 sergiou87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall, although I'm missing some x86 references.

This is just a thought, but I'm also concerned about the amount of steps needed to install the extra dependencies for linux arm/arm64.

I'm thinking about being in a rush to release a new git version (e.g. security fix), being forced to upgrade the Ubuntu runner, need to update these deb sources, something has changed in them and it becomes a not-so-easy fix 😅

If we weren't able to fix the issue in reasonable time, and since our priority is GitHub Desktop, we might decide to drop support for Linux arm32/arm64 (at least temporarily) to get the release going.

Unfortunately, I don't have a better suggestion to work around it…

.github/workflows/ci.yml Show resolved Hide resolved
script/build-ubuntu.sh Show resolved Hide resolved
script/build-ubuntu.sh Show resolved Hide resolved
@theofficialgman
Copy link
Contributor Author

theofficialgman commented Mar 13, 2023

This is just a thought, but I'm also concerned about the amount of steps needed to install the extra dependencies for linux arm/arm64.

keep in mind that these are the same as the amd64 dependencies that just happen to be pre-installed on the github runner. Obviously the non arm64/armhf dependencies are just there to be explicit. I left them in since it made testing easier when running on my local minimal ubuntu chroot. tar jq p7zip-full p7zip-rar pkg-config wget curl xz-utils unzip zip bzip2 zsync automake autoconf are all installed by default and can be removed

see:

autoconf is already the newest version (2.69-11).
automake is already the newest version (1:1.15.1-3ubuntu2).
build-essential is already the newest version (12.4ubuntu1).
pkg-config is already the newest version (0.29.1-0ubuntu2).
zip is already the newest version (3.0-11build1).
jq is already the newest version (1.5+dfsg-2).
p7zip-full is already the newest version (16.02+dfsg-6).
zsync is already the newest version (0.6.2-3ubuntu1).
p7zip-rar is already the newest version (16.02-2).
bzip2 is already the newest version (1.0.6-8.1ubuntu0.2).
curl is already the newest version (7.58.0-2ubuntu3.22).
libexpat1-dev is already the newest version (2.2.5-3ubuntu0.9).
libexpat1-dev set to manually installed.
tar is already the newest version (1.29b-2ubuntu0.3).
unzip is already the newest version (6.0-21ubuntu1.2).
wget is already the newest version (1.19.4-1ubuntu2.2).
xz-utils is already the newest version (5.2.2-1.3ubuntu0.1).

so it is just simply two steps. add the corresponding apt repo (ports) that contains armhf/arm64

echo "deb [arch=amd64,i386] http://archive.ubuntu.com/ubuntu/ bionic main universe multiverse restricted" | sudo tee /etc/apt/sources.list
echo "deb [arch=amd64,i386] http://archive.ubuntu.com/ubuntu/ bionic-updates main universe multiverse restricted" | sudo tee -a /etc/apt/sources.list
echo "deb [arch=arm64,armhf] http://ports.ubuntu.com/ubuntu-ports/ bionic main universe multiverse restricted" | sudo tee -a /etc/apt/sources.list
echo "deb [arch=arm64,armhf] http://ports.ubuntu.com/ubuntu-ports/ bionic-updates main universe multiverse restricted" | sudo tee -a /etc/apt/sources.list

and then install the armhf/arm64 dependencies (the headers that are specific to this architecture that are currently only installed for amd64)

gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu libcurl4-openssl-dev:arm64 libssl-dev:arm64 zlib1g-dev:arm64 gettext

I will remove the unnecessary dependencies since it makes you worried 😄

@theofficialgman
Copy link
Contributor Author

theofficialgman commented Mar 13, 2023

This is just a thought, but I'm also concerned about the amount of steps needed to install the extra dependencies for linux arm/arm64.

I'm thinking about being in a rush to release a new git version (e.g. security fix), being forced to upgrade the Ubuntu runner, need to update these deb sources, something has changed in them and it becomes a not-so-easy fix sweat_smile

redundant dependencies removed and ubuntu version now determined at runtime:
https://github.com/theofficialgman/dugite-native/actions/runs/4405797627

should make changing between github runners a non-issue

added arm, and arm64 as acceptable TARGET_ARCH options

correct update-git-lfs.ts to update linux x86, arm64, and arm

correct check static linking for 32bit architectures

transition to use significantly better naming scheme in preparation for extension to multiple more architectures
azure apt repos are used on github runner, so use the ports repo from azure for armhf/arm64
@theofficialgman
Copy link
Contributor Author

cleaned up commits

@theofficialgman
Copy link
Contributor Author

@theofficialgman theofficialgman changed the title Add ARM64 and ARM32 Linux Builds Add ARM64, ARM32, and x86 Linux Builds Mar 13, 2023
Copy link
Member

@sergiou87 sergiou87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

@sergiou87 sergiou87 merged commit 7408641 into desktop:master Mar 15, 2023
tidy-dev added a commit that referenced this pull request Apr 25, 2023
This reverts commit 7408641, reversing
changes made to d2144be.
@tidy-dev tidy-dev mentioned this pull request Apr 25, 2023
theofficialgman added a commit to theofficialgman/dugite-native that referenced this pull request Apr 26, 2023
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.

Github Desktop Dugite fails on arm64 linux add support for ARM32 packaging
2 participants