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 linux #247

Merged
merged 13 commits into from
Jan 22, 2025
Merged

Add arm64 linux #247

merged 13 commits into from
Jan 22, 2025

Conversation

ahoneybun
Copy link
Contributor

@ahoneybun ahoneybun commented Dec 6, 2024

This builds if you run the build.py file with the ARCH that matches your system enabled:

  • Built x86_64 on a thelio-b1 locally
  • Built aarch64 on a Pi 4B remotely and Astra locally
  • Fix build.py to have a variable for the CI to call depending on the ARCH
  • Update Github CI build the correct ARCH using the correct Runner.

This also updates the linuxdeploy-plugin-gtk.sh to match upstream as that builds for me locally using ./build.py --release.

@ahoneybun ahoneybun force-pushed the add-arm64-linux branch 5 times, most recently from 40bf778 to 0fcc8e4 Compare December 9, 2024 14:00
@ahoneybun
Copy link
Contributor Author

@ahoneybun ahoneybun marked this pull request as ready for review January 3, 2025 16:19
@ids1024
Copy link
Member

ids1024 commented Jan 3, 2025

https://github.blog/changelog/2024-09-03-github-actions-arm64-linux-and-windows-runners-are-now-generally-available

Arm64 runners are available to customers on our Team and Enterprise Cloud plans.

The pop-os organization is currently on the free plan (plus LFS storage). So unless we change that, I think we'd need to either wait for it to be available their too, or do this a different way.

@ids1024
Copy link
Member

ids1024 commented Jan 3, 2025

Cross-compiling is easy with Rust, though the C library dependencies are a hassle. If pkg-config handles those fine though, it would work with an arm64 sysroot that has the necessary packages.

@ahoneybun
Copy link
Contributor Author

We could build it with another CI to not need to be signed and just provide the hash I believe right?

@ids1024
Copy link
Member

ids1024 commented Jan 3, 2025

Yeah, that's also a possibility, if there are good alternatives. The AppImage isn't signed.

@ahoneybun
Copy link
Contributor Author

@ids1024 sorry I meant to just put the arm64 AppImage in the Github release and link to it from the site since it isn't signed anyway. The CI is only really for making a release automatic.

@ids1024
Copy link
Member

ids1024 commented Jan 4, 2025

You mean building locally on an ARM64 system and add it to the release manually? Yeah, that should work too.

@ahoneybun
Copy link
Contributor Author

I built the latest 1.3.12 release on an Astra yesterday which I can send over. If we want to add building that as a checkbox that could work and I would just remove my changes to the ci.yml file so this PR should pass.

@ids1024
Copy link
Member

ids1024 commented Jan 7, 2025

Yeah, merging any changes to the appimage build script and leaving CI unchanged for now would be good here.

It may not be that hard to set up a cross-compile build. I think I almost have that working after building an arm64 focal sysroot using debootstrap and setting some PKGCONFIG_ env vars...

@ahoneybun
Copy link
Contributor Author

I've removed it for now and we can add it back later. Depending on the Github pricing we may want to look at this:

https://www.blacksmith.sh/blog/building-multi-platform-docker-images-for-arm64-in-github-actions

@ahoneybun
Copy link
Contributor Author

It looks like we may be able to use the CI soon!

https://github.blog/changelog/2025-01-16-linux-arm64-hosted-runners-now-available-for-free-in-public-repositories-public-preview/

@ahoneybun ahoneybun requested a review from ids1024 January 18, 2025 17:19
@ahoneybun
Copy link
Contributor Author

@ahoneybun
Copy link
Contributor Author

Well after running it again it works now!

@ahoneybun
Copy link
Contributor Author

I rebased on master with the Windows fix and all the CI are passing now!

@ahoneybun ahoneybun requested a review from a team January 21, 2025 18:42
@ids1024
Copy link
Member

ids1024 commented Jan 21, 2025

The upload-to-release Github Actions job also needs to be updated for this to be automatically added to a release. Should be sufficient to copy the x86_64 linux section there, and change to aarch64.

Otherwise, the linux/build.rs and CI changes look good.

I rebased on master with the Windows fix and all the CI are passing now!

Looks like you did a cherry-pick instead of a rebase? It should be rebased, and squashed into one or two commits. But doing a squash merge may amount to the same thing.

@ahoneybun
Copy link
Contributor Author

ahoneybun commented Jan 21, 2025

I don't think the upload-to-release will run with a PR like this until there is a new version right?

Yea looks like GH's default is to "Squash and merge" which should fix it up.

Copy link
Member

@ids1024 ids1024 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 now. (As long as it's merged with a squash merge.)

Copy link
Member

@leviport leviport left a comment

Choose a reason for hiding this comment

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

This only touches build scripts and CI seems happy, so I think that's sufficient.

@ids1024 ids1024 merged commit f81b9b1 into master Jan 22, 2025
32 checks passed
@jackpot51 jackpot51 deleted the add-arm64-linux branch January 22, 2025 15:05
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.

3 participants