Closed shiftkey closed 1 year ago
continuous integration builds - I want to avoid shipping releases to be tied to a specific machine - how can we avoid this?
Azure pipelines has arm and arm64.
I have an extra Raspberry Pi 4 that can be set up as a compiling server. @shiftkey, would that benefit you at all?
arm64 support seems to have been finalized (just waiting on tests) as of a few weeks ago for github desktop macos and windows 10 builds. interested in arm64 finally getting (and hopefully maintaining) support on linux as welll
is this relevant ? https://github.com/desktop/dugite-native/pull/330#issuecomment-761889094
GitHub actions has no arm64 support
:eyes:
is this relevant ? desktop/dugite-native#330 (comment)
GitHub actions has no arm64 support
👀
Yes that is relevant. Fortunately, there's a way around this: it's possible to use QEMU within Github actions to emulate armv7l and arm64 machines for compilation purposes.
Several repositories have been doing this recently, like eDEX-UI. These links may be helpful for anyone who's interested: (in no particular order)
Something similar ought to be possible for Github desktop in this case.
What's the status of this issue? @shiftkey
Running Fedora on a Silicon MacBook.
I have the same situation and question as @simonSlamka Is there anything I can help with?
@shiftkey
I've recently been informed about an ARM sponsored program called "Works on ARM". I'll copy the description here:
Arm and miniNodes have partnered to make Arm-based edge devices and single board computers available for open source software developers to build, test and optimize for Arm. Developers can request hardware for any number of use-cases including, but not limited to:
Porting, testing, and optimizing for Arm
Building new projects on Arm-based edge hardware
Getting more visibility for your project through the Works on Arm program
https://github.com/WorksOnArm/mininodes-arm-edge
If you wanted, I'm sure you could apply (create a simple github issue stating what the project is for and it will almost certainly be accepted). Have them setup a ubuntu bionic ARM64 image on one of the devices (easiest to just do it on a jetson nano or xavier since thats already what they run). Create a github actions ARM64 selfhosted runner on there, and then use it for this project and any of the dependencies.
@Botspot I went through the process of manually building first dugite-native (and patching its build script), then patching the many github desktop buildfiles that are hardcoded for x64, and made a deb and appimage for arm64. this was all built on bionic (as is github desktop and dugite normally) so it should work on anything newer than that.
the files are too big to drop here so I put them in my testing repo. I was too lazy to fix rpm but that is simple as well. the dugite-native arm64 linux build is there as well.
https://github.com/theofficialgman/testing/releases/tag/github-desktop
Edit: see https://github.com/shiftkey/desktop/issues/251#issuecomment-1119160116 for instructions edit2: rpm, deb, and appimage all now available
@Botspot I went through the process of manually building first dugite-native, then patching the many github desktop buildfiles that are hardcoded for x64, and made a deb and appimage for arm64. this was all built on bionic (as is github desktop and dugite normally) so it should work on anything newer than that.
the files are too big to drop here so I put them in my testing repo. I was too lazy to fix rpm but that is simple as well. the dugite-native arm64 linux build is there as well. https://github.com/theofficialgman/testing/releases/tag/github-desktop
Signing in to GitHub is not working on AppImage, it won't return to the app after signing in from the browser.
DEB package works perfectly! 🎉
I am on Raspberry Pi OS bullseye arm64.
Signing in to GitHub is not working on AppImage, it won't return to the app after signing in from the browser.
Yeah I noticed the same thing. I've never tried the appimages from this repo so there might be the same problem. The files contained are the same as the Deb and raw folder (Which both work as you said).
Edit: seems like a known issue https://github.com/shiftkey/desktop/issues/710 https://github.com/shiftkey/desktop/issues/632#issuecomment-1086921847
also I just want to react to the "blockers" posting in the original post and how I got around them:
embedded Git - https://github.com/desktop/dugite-native/pull/315 - need to figure out how to build Git from source locally and slipstream the packaged bits into a build
just pull dugite-native and edit a couple of the build scripts to use arm64 instead of the currently hardcoded x86_64/amd64/x86. git LFS already has arm64 linux builds posted so just the dependencies.json file and the buildscripts need to be edited to use it. then it will build correctly and produce a tar.xz
native dependencies - NodeJS does have support for building native modules for ARM64, but I haven't explored this local packaging - there's manual steps to do this here but we'd need to update this to support scripted builds
I'm not having any issues at all here, must have been a problem a long time ago but it "just works" now.
continuous integration builds - I want to avoid shipping releases to be tied to a specific machine - how can we avoid this?
current releases are already shipped for a specific machine. some of the binaries are built statically but most of it depends on glibc 2.27+ (because your continuous integration builds use ubuntu bionic as a base). Just create an arm64 self hosted runner for github actions and deploy it on a nvidia jetson running ubuntu bionic (or another arm computer running ubuntu bionic) and your builds will be just as compatible as the current releases are for x86_64 linux
and of course, this repo has multiple buildscripts and files that need editing to package the debs/rpm/appimage with the correct arm64 naming
copying over the changes I made to this thread, this is not upstreamable in this case:
edit: refer to this comment where I keep the instructions updated for latest release of github desktop https://github.com/Botspot/pi-apps/pull/1775#issuecomment-1119159519
Using the the aur on arch I actually managed to get this to build on arm
Requirements to build 1) System requirements:
6GB of ram. If you have less then you are going to need to add some swap. You need 6GB free just to be clear or your system will crash. 2) git and base-devel You'll get build errors otherwise 3) gconf This guide won't cover exactly how to install this, but if you get stuck on an error related to architecture=>follow the install guide and ignore line 2 under step one's subheading 4) working a xorg environment Not sure if it works on wayland. I only tested it on X11.
Steps to install:
This is a rough guide 0) Clone the repository from the aur.
git clone https://aur.archlinux.org/github-desktop.git
1) edit PKGBUILD You need to change the linearch=(x86_64)
toarch=(aarch64)
You also need to change the linecp -r --preserve=mode dist/github-desktop-linux-x64/* "$pkgdir/opt/$pkgname/"
tocp -r --preserve=mode dist/github-desktop-linux-arm64/* "$pkgdir/opt/$pkgname/"
2) During the install. You are going to need to make the following file "./github-desktop/src/github-desktop/app/node_modules/dugite/git". I recommend doing it after webpack starts compilingcd github-desktop&&makepkg -si
mkdir src/github-desktop/app/node_modules/dugite/git
Not sure why, but git isn't downloaded correctly 3) After this, the app should have completed installing, but git is broken.
Fixing git:
0) Install openssh, make and curl
Needed for some functionality in git. This is why we can't use the system provided package. You still need said package btw. 1) goto /opt/github-desktop/resources/app
cd /opt/github-desktop/resources/app
2) clone gitsudo git clone https://github.com/git/git.git
3) build gitsudo make prefix=/opt/github-desktop/resources/app/git/ all doc info
sudo make prefix=/opt/github-desktop/resources/app/git/ install install-doc install-html install-info
Feel free to ignore any errors.
If everything works you should be able to launch this on arm. I've yet to install vs code so I cannot comment on how well that works. If you logged in before fixing git, file->options->git->save should fix the desync between the gui and the backend.
It runs well on the pi. I hope this is somewhat helpful to someone.
@Hanro50, thank you for the amazing guide! i had no idea there was such a close resource to build a variety of software using aur. i did have to build gconf
, but aur also made that easy for me. but step two is confusing to me:
- During the install. You are going to need to make the following file "./github-desktop/src/github-desktop/app/node_modules/dugite/git". I recommend doing it after webpack starts compiling
cd github-desktop&&makepkg -si
mkdir src/github-desktop/app/node_modules/dugite/git
Not sure why, but git isn't downloaded correctly
but when i run the two commands there, i get this:
╭─mycelium@asahi:~/Documents/github-desktop ‹master●›
╰─🐧 $ cd github-desktop&&makepkg -si
mkdir src/github-desktop/app/node_modules/dugite/git
==> ERROR: PKGBUILD does not exist.
mkdir: cannot create directory ‘src/github-desktop/app/node_modules/dugite/git’: No such file or directory
or should i just do this:
DUGITE=./github-desktop/src/github-desktop/app/node_modules/dugite/git
mkdir -p ${DUGITE}
https://github.com/napi-rs/napi-rs/discussions/1206 perhaps a means of linux in that wall of TLDR
@shiftkey I have done the work a week ago to bring ARM32/ARM64 linux to the CI for dugite and dugite native (at equal or faster speed than x86_64 builds so NO issue there)
please see if you can push these PRs through (referenced above) and then building for ARM32/64 linux for Desktop can be done simply in the CI here. those are the last blocking issues and it would be a shame for fully functional PRs to sit any longer with no response.
For anyone who wants to test these out, a pre-release package is available here: https://github.com/shiftkey/desktop/releases/tag/release-3.2.7-test7
There have been several requests for shipping something for ARM versions:
86
245
I'm going to use this issue to capture blockers for this:
Please upvote this if you're interested, or comment if you have any insights to contribute about this work.