-
-
Notifications
You must be signed in to change notification settings - Fork 151
Add aarch64
support to CI
#1743
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
Conversation
dcdce8a
to
a317990
Compare
I could start to build the Monero binaries for macOS aarch64. That would help? |
Hey @woodser That would be amazing if you could do that and publish the binaries, then I can make the necessary updates here and do some more testing. |
69547f5
to
1a42336
Compare
aarch64
architecture support to CIaarch64
support to CI
you made it here |
I'm not able to create the aarch64 binaries using depends from Ubuntu 20.04:
If anyone can confirm or debug that build process, these binaries could be incorporated in the release. |
I'm able to run Haveno on Ubuntu ARM64. Isn't this using JavaFX 21 on linux/aarch64 then? |
Just want to make sure I understand. You're saying that by running Haveno built natively for ARM64 on MacOS, it performs significantly better than Haveno built for x86_64 on ARM64? I'm running Haveno on M4 chip (built for x86) and haven't noticed any slow performance, but maybe it's more noticeable on M2. |
Extend CI workflow to build for both `x86_64` and `aarch64` architectures: - Add ARM variants for Ubuntu and macOS in the build matrix - Skip tests on `aarch64` builds with `-x test` flag as JavaFX 21.x.x doesn't currently support the ARM64 architecture - Update artifact naming to include architecture identifiers - Configure architecture-specific build paths and release outputs This change enables native builds for ARM-based systems like Apple Silicon Macs and ARM servers, improving performance for users on these platforms while maintaining full test coverage on `x86_64` where supported. Make localnet cache OS-specific Prevent Error: Failed to CreateArtifact: Received non-retryable error: Failed request: (409) Conflict: an artifact with this name already exists on the workflow run Add a warning about `linux/aarch64` tests being skipped Simplify GitHub Actions workflow conditions Replace verbose condition syntax with simpler `runner.os` expressions to improve readability and maintainability. This change: - Uses `runner.os` instead of specific `matrix.os` version strings - Removes unnecessary `${{ }}` expression wrappers in if conditions - Consolidates OS-specific conditions (e.g. `ubuntu-22.04` or `ubuntu-22.04-arm`) into simpler checks (`runner.os == 'Linux'`) Fix JavaFX loading on Mac ARM64 architecture JavaFX 21.0.2 supports Mac ARM64 (Apple Silicon) but was failing to load with `UnsatisfiedLinkError` because the build system wasn't detecting ARM architecture properly. This change allows the build system to correctly identify Mac ARM64 systems and use the appropriate JavaFX libraries, resolving the compatibility issues when running on Apple Silicon Macs. Split Build and Package Installer steps Cleaner CI output, split Build and Package installer step into two steps
1a42336
to
9ac96e0
Compare
When testing on my local (M2 Pro) when I made this PR, yes, the UI was significantly more responsive and felt "snappier" when using the aarch64 built version vs running x86 with Rosetta emulation. Edit: I've rebased this PR, will test again on my local, maybe even share a screen recording.
IIRC, it was specifically when running the tests on linux-aarch64 where JavaFX breaks. |
@woodser I've made a short (2 minute) screen recording to show the difference between aarch64 (native) and x86 (Rosetta 2 emulation) on my M2 Macbook Pro, but it's too big for a Github comment (60MB). Is there a way I can share it with you? Edit: I've uploaded it to catbox.moe - https://files.catbox.moe/974u4g.mov Edit 2: The app starts up quite a bit faster, scrolling is way smoother, the UI is significantly more responsive. |
Are you able to run the tests on your Ubuntu ARM64 machine? If I enable the tests in
The test report logs:
Taking a look at the published artifacts for JavaFX Base 21.0.2 there's no Here's the zip containing the error reports from running the tests on ubuntu-22.04-arm Edit: $ file ~/.openjfx/cache/21.0.2+5/aarch64/libprism_*
/root/.openjfx/cache/21.0.2+5/aarch64/libprism_es2.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, not stripped
/root/.openjfx/cache/21.0.2+5/aarch64/libprism_sw.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, not stripped $ readelf -h ~/.openjfx/cache/21.0.2+5/aarch64/libprism_es2.so
ELF Header:
Magic: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00
Class: ELF64
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: DYN (Shared object file)
Machine: Advanced Micro Devices X86-64
Version: 0x1
Entry point address: 0x0
Start of program headers: 64 (bytes into file)
Start of section headers: 60560 (bytes into file)
Flags: 0x0
Size of this header: 64 (bytes)
Size of program headers: 56 (bytes)
Number of program headers: 7
Size of section headers: 64 (bytes)
Number of section headers: 30
Section header string table index: 29 I suspect the reason you can run the Haveno application on Ubuntu ARM64, but not the tests, is because the tests try to load the |
@rblain95 I found that the tests can be run on Linux ARM64 with |
Hey @woodser, if I update the build command with those skips ( |
JavaFX `21.x.x` ships with `x86_64` versions of `libprism_es2.so` and `libprism_s2.so` shared objects. This causes desktop tests to fail on `linux/aarch64`. Instead of skipping all tests (`-x test`), just skip the Desktop tests.
@woodser, I've updated to only skip the Desktop tests ( Edit: I think it might be valuable for me to leave a comment somewhere explaining that:
|
Sounds good, it can be added within build.yml where the skip flag is added. Where your existing comment is works: https://github.com/haveno-dex/haveno/pull/1743/files#diff-5c3fa597431eda03ac3339ae6bf7f05e1a50d6fc7333679ec38e21b337cb6721R45 |
Strange that I'm not able to recreate the error by skipping check style checks on Ubuntu 20.04 and 24.04. I haven't tested 22.04 though. |
I'm not able to get the aarch64 deb file to run on Ubuntu 20.04, 22.04, or 24.04. Is it working for you? |
Hey @woodser I set up an Ubuntu 24.04 ARM64 VM on my Mac and tested the ![]() ![]() ![]() ![]() Edit: Also tested Ubuntu 22.04, no complaints about |
Ok I'm able to make it work using dkpg instead of apt. Thanks. |
I think this is ready to merge AFIACT. |
Extend CI workflow to build for both
x86_64
andaarch64
architectures:linux/aarch64
builds with-x test
flag as JavaFX 21.x.xdoesn't currently support the
linux/aarch64
platformThis change enables native builds for ARM-based systems like Apple Silicon
Macs and ARM servers, improving performance for users on these platforms
while maintaining full test coverage where supported.
There's a small catch with the packaged Monero binaries on MacOS.
As the custom Haveno Monero binaries aren't being cross-compiled for multiple
CPU architectures on MacOS, the
monero-wallet-rpc
isx86_64
.This isn't a big deal as this means only the
monero-wallet-rpc
will be run viaRosetta 2 (emulation).
The big win is that, in my testing, everything else is running natively without
emulation, which is a massive UX improvement.
From a usability perspective, I've run and tested this on my M2 MacBook Pro and
the responsiveness of the UI is night and day.
Please feel free to turn the pedantic dial up to 11.
I am open to any/all suggestions.