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

[Feature request] Add macOS arm64 to Cirrus CI #12599

Open
shinra-electric opened this issue Sep 3, 2022 · 9 comments · May be fixed by #14028
Open

[Feature request] Add macOS arm64 to Cirrus CI #12599

shinra-electric opened this issue Sep 3, 2022 · 9 comments · May be fixed by #14028
Labels
Build and CI Anything related to the build process and continuous integration OS: Mac

Comments

@shinra-electric
Copy link
Contributor

shinra-electric commented Sep 3, 2022

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.

@clienthax
Copy link
Contributor

clienthax commented Sep 3, 2022

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

@shinra-electric
Copy link
Contributor Author

I think it does:

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

It's probably new though.

@clienthax
Copy link
Contributor

clienthax commented Sep 3, 2022

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

@shinra-electric
Copy link
Contributor Author

shinra-electric commented Sep 3, 2022

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
Copy link
Contributor Author

@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

@clienthax clienthax mentioned this issue Sep 3, 2022
@Megamouse Megamouse added OS: Mac Build and CI Anything related to the build process and continuous integration labels Sep 5, 2022
@shinra-electric
Copy link
Contributor Author

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

@DarthMDev
Copy link
Contributor

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

@DarthMDev
Copy link
Contributor

ill also look into building separately

@DarthMDev DarthMDev linked a pull request Jun 15, 2023 that will close this issue
@AniLeo
Copy link
Member

AniLeo commented Jun 15, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Build and CI Anything related to the build process and continuous integration OS: Mac
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants