rpcs3 icon indicating copy to clipboard operation
rpcs3 copied to clipboard

[Feature request] Add macOS arm64 to CI

Open shinra-electric opened this issue 3 years ago • 10 comments

Quick summary

Add macOS arm64 to Cirrus CI

Details

Cirrus CI currently only provides x86_64 macOS builds.

~~As of writing, compilation for arm64 is broken (not just on Macs). See #12577~~ Edit: fixed

There are occasionally regressions that are introduced that go unnoticed since there are no Arm CI builds. This can be prevented with a Cirrus test build.

One argument that may be given for not doing this is that arm64 support on macOS is not fully implemented. However several 2D games such as Dragon's Crown and some of the Arkedo series do actually work.

Edit: Cirrus CI now builds the x86 macOS artefacts using an Arm64 VM, so cross-compilation is not an issue.

shinra-electric avatar Sep 03 '22 10:09 shinra-electric

Cirrus does not have arm64 vms for macOS yet from what I can see. In theory we could work around this by making a fairly hacky docker container but that's unideal

clienthax avatar Sep 03 '22 12:09 clienthax

I think it does:

https://cirrus-ci.org/guide/macOS/

It's probably new though.

shinra-electric avatar Sep 03 '22 13:09 shinra-electric

Messing around with it here https://github.com/clienthax/rpcs3/tree/arm64-tests

clienthax avatar Sep 03 '22 13:09 clienthax

Bear in mind it should fail because of #12577

~~Also the arm building instructions from #12115 requires this change in hidapi: sed -i '' "s/extern const double NSAppKitVersionNumber;/const double NSAppKitVersionNumber = 1343;/g" 3rdparty/hidapi/hidapi/mac/hid.c~~ Edit: Nevermind, this is already in the build script

Another known issue to be aware of is that it won’t build if qt@6 is installed. See #12477 ~

shinra-electric avatar Sep 03 '22 15:09 shinra-electric

@clienthax I was having a look at your branch, and there are a few points about the build script I noticed. (I was going to do a PR but I suddenly realised I don't know how Cirrus works, so I thought I'd just comment here)

When building for Arm on macOS there are a few CMake commands that are different than for x86:

-DPNG_ARM_NEON=ON <-- This is the Arm SIMD instruction set and should be on -DCMAKE_OSX_ARCHITECTURES="arm64" <--This option is missing from the build script -DLLVM_TARGETS_TO_BUILD="X86;AArch64;ARM" <-- I'm not sure why X86 is there, but it's on the Arm build instructions -DUSE_SYSTEM_MVK=ON <-- I don't know if this is required when building on Cirrus -DUSE_SYSTEM_FFMPEG=ON <-- Same

shinra-electric avatar Sep 03 '22 16:09 shinra-electric

Just bumping this since Cirrus CI now builds the macOS artefacts using an Arm64 VM. It should be easier to implement now than before.

shinra-electric avatar Mar 21 '23 17:03 shinra-electric

I wonder if arm64 compilation is possible now and if it is could a universal2 build be done

DarthMDev avatar Jun 15 '23 11:06 DarthMDev

ill also look into building separately

DarthMDev avatar Jun 15 '23 11:06 DarthMDev

For now it's best to just have arm64 separately in CI, universal2 build is not really interesting to spend time building on CI until the arm64 build works properly

AniLeo avatar Jun 15 '23 11:06 AniLeo

Updated title, since this should be for Azure CI now

AniLeo avatar Aug 25 '24 20:08 AniLeo

This has been implemented

Megamouse avatar Jan 03 '25 18:01 Megamouse