Skip to content

Conversation

@psadi
Copy link
Collaborator

@psadi psadi commented Jan 10, 2025

fixes #7

@psadi
Copy link
Collaborator Author

psadi commented Jan 10, 2025

Hey @Samueru-sama - I have added build steps for various architectures, could you help to review these changes and share your views.

I have included all the available type2-runtimes

@psadi psadi changed the title feat: add support arm build feat: add support for various architectures Jan 10, 2025
@psadi psadi force-pushed the feature/arm_build branch 2 times, most recently from b22c279 to 08ade25 Compare January 10, 2025 16:44
@psadi psadi mentioned this pull request Jan 10, 2025
@psadi psadi changed the title feat: add support for various architectures feat: add support for arm/aarch64 Jan 10, 2025
@psadi psadi force-pushed the feature/arm_build branch from 08ade25 to aa6be68 Compare January 10, 2025 17:26
@psadi psadi force-pushed the feature/arm_build branch 2 times, most recently from d9c8ba2 to 9fc0291 Compare January 11, 2025 07:22
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./Ghostty-x86_64.AppImage*
file: ./Ghostty-.*\.AppImage.*
Copy link
Member

Choose a reason for hiding this comment

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

If you glob Ghostty-.*\.AppImage.* then the actual AppImage won't be picked up since it does not matchAppImage.

Copy link
Collaborator Author

@psadi psadi Jan 11, 2025

Choose a reason for hiding this comment

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

Yeah, I'll rebase the changes you pushed as part the versioning, that regex can be tweaked once we have aarch64 builds.

I'm still trying to find a viable way to getting a arm based GitHub runner. So far there has been no luck (GitHub's ARM runners are in public beta for Enterprise/Teams and other 3rd Providers requires a GitHub Org account)

Copy link
Collaborator Author

@psadi psadi Jan 11, 2025

Choose a reason for hiding this comment

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

I really dont want to spin a cloud based ARM VM just for this purpose (its not practical and costs more), Do you have a way forward for ARM runners ?

Copy link
Contributor

Choose a reason for hiding this comment

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

From my point of view using qemu emulation should be appropriate. It only compiles for 7 or so minutes on x86_64. It will take longer, but it should be acceptable.

As far as I can see there are the following steps: 1. installing the arm64 packages under emulation, 2. cross compiling with zig, 3. building the AppImage with the arm64 linked libraries.

  1. Can be slower. I have a project where I add the entire Ubuntu desktop to a Ubuntu server image for a custom raspi image which takes about 1 hour on slower machines to complete. The performance hit for the packages required here should be this much, if at all. There's an Ubuntu Rockchip project which generates over 100 images by the way. 🙂
  2. I'm building custom Tailscale binaries, if the zig cross compile tooling is similar to golang (it looks like that to me) then there may not be much of a performance hit. Ghostty compiles a few minutes more, but I wouldn't be concerned about that.
  3. This will be interesting and I hope AppImage packaging will be as performant as Flatpak here when all dependencies have been built. Expect no performance hit, but there may be a smaller one. I tried to compile the Jellyfin Flatpak for arm64 on my machine which takes over 3 hours compared to 30 minutes, but that comes from compiling lots of dependencies and particularly some node webpack components where it sits there and practically doing almost nothing for over an hour. This should not be an indication though. You should try it. Emulation is not as bad as some articles make it look like to sell you ARM runners.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

There is a second PR #11 open with this take.

We are exactly at a point where we need to change some build flags to enable compilation based on arch.

I will be working on this later today. But feel free to give it a shot!

@psadi psadi force-pushed the feature/arm_build branch from 9fc0291 to e0afecf Compare January 11, 2025 15:38
@psadi
Copy link
Collaborator Author

psadi commented Jan 11, 2025

@lwbt @Samueru-sama - here are my findings so far,

PR #11 -- set the baseline config to achieve this. Unfortunately all aarch64 runs resulted in a compilation panic in gh actions.

I really want to test the config and see if appimage is generating, Hence i spun a ARM VM in AWS and with the provided baseline config in build and setup scripts with minor tweaks, I'm able to successfully generate successfully.

Screenshot from 2025-01-12 00-38-09

At First, i tried with instance t4g.nano - the build failed in midst
Then. I tried with t4g.small - the build failed again, i then increased the swapspace to 2 GB and alas the build got generated. (The build was really slow at 15-20 mins just for the app compilation, appimage generated quickly though)

I believe, there isn't much we can do with the standard runners along with qemu + docker build config as there should be a resource crunch or emulation incompatability

I guess we are now down to few options,

  1. Use an cloud based vm (arm), provision on demand, use it as a self-hosted runner for the build and destroy the environment (we do this everytime but can limit the event only during release (once testing is confirmed)
  2. Switch to other CI provides i.e, Travis/Circle CI who provide ARM based agents (need to explore the options further)
  3. Build locally with any arm based system and upload manually during release (i don't vouch this)
  4. Wait untill a ARM based linux runner is provided for free.

I tried contacting warpbuild and blacksmith to see if a free-tier arm runner can be utilized, unfortunately they only support Gh Org Accounts.

I'm open to hear your thoughts/opinions on this.

@psadi
Copy link
Collaborator Author

psadi commented Jan 11, 2025

Build link for ARM (Link from my cloud storage, i will remove it after 7 days)

If possible, Please test and let me know.

@lwbt
Copy link
Contributor

lwbt commented Jan 12, 2025

Build link for ARM (Link from my cloud storage, i will remove it after 7 days)

If possible, Please test and let me know.

I only have a Raspberry Pi 4 currently which usually runs without a GUI, it should work with a properly configured desktop or a better board.
Screenshot from 2025-01-11 23-31-52

ghostty-org/ghostty#2602

@psadi
Copy link
Collaborator Author

psadi commented Jan 12, 2025

I'll try to get a raspberry pi5 myself (new or used whichever is cheaper). This could be valid use case and possibly I could setup gh runner there till.

@psadi psadi force-pushed the feature/arm_build branch from c194633 to 6f76da7 Compare January 13, 2025 06:59
@elerch
Copy link

elerch commented Jan 14, 2025

OCI provides free ARM you could use as a runner. I have had a 4CPU/24GB RAM instance running there for a couple years: https://docs.oracle.com/en-us/iaas/Content/FreeTier/freetier_topic-Always_Free_Resources.htm

IIRC, capacity was an issue getting it and I had to retry a few times, though this was just after the announcement. I think advice at the time was to use the San Jose region.

@psadi psadi force-pushed the feature/arm_build branch from 6f76da7 to b0845b0 Compare January 15, 2025 08:20
@psadi
Copy link
Collaborator Author

psadi commented Jan 16, 2025

Hey @lwbt - Any Luck on getting this tested in the PI with GUI, There seems to be a open GH Discussion in upstream on the GL Context Error

@psadi
Copy link
Collaborator Author

psadi commented Jan 16, 2025

OCI provides free ARM you could use as a runner. I have had a 4CPU/24GB RAM instance running there for a couple years: https://docs.oracle.com/en-us/iaas/Content/FreeTier/freetier_topic-Always_Free_Resources.htm

IIRC, capacity was an issue getting it and I had to retry a few times, though this was just after the announcement. I think advice at the time was to use the San Jose region.

thanks for pointing this, the on-boarding process with Oracle Cloud is truly messed up. I'm unable to sign-up and there has been n attempts already. On the verge of giving up and just get a Pi instead.

@psadi psadi force-pushed the feature/arm_build branch 3 times, most recently from 1dc3879 to d2b9e1b Compare January 17, 2025 20:44
@psadi
Copy link
Collaborator Author

psadi commented Jan 17, 2025

Hey @lwbt - Could you help to test the latest appimage build x84 functions as intended. There is a AppRun script check for aarch64 which has paased.

@Samueru-sama - could you help to review these changes once? if all good -- we would have support for x86_64 and aarch64.

@psadi psadi force-pushed the feature/arm_build branch 2 times, most recently from 16093eb to f8e9ac1 Compare January 17, 2025 21:37
@psadi psadi force-pushed the feature/arm_build branch from f8e9ac1 to 94c65b6 Compare January 17, 2025 21:37
@elerch
Copy link

elerch commented Jan 18, 2025

I haven'tvtried this, but it looks like you can now use arm64 runners for free for public repos - no weird Oracle signups or Pi needed: https://github.blog/changelog/2025-01-16-linux-arm64-hosted-runners-now-available-for-free-in-public-repositories-public-preview/

@psadi psadi merged commit 56cbf5e into main Jan 18, 2025
4 checks passed
@psadi psadi deleted the feature/arm_build branch January 18, 2025 10:40
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.

arm64 build?

5 participants