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 macOS arm64 to Cirrus CI #14028

Draft
wants to merge 13 commits into
base: master
Choose a base branch
from
Draft

Conversation

DarthMDev
Copy link
Contributor

Attempts to Resolve #12599

@DarthMDev
Copy link
Contributor Author

dont know why linux is failing 🤔

@DarthMDev
Copy link
Contributor Author

I will squash all these commits when I am done testing and fixing.

@shinra-electric
Copy link
Contributor

If it helps, this I what I do to compile locally:

brew install molten-vk vulkan-headers sdl2 nasm qt@5 ninja cmake glew ffmpeg llvm@16
# Make sure glslang and qt@6 is uninstalled, otherwise building will fail

export Qt5_DIR=$(brew --prefix)/opt/qt5
export VULKAN_SDK=$(brew --prefix)/opt/molten-vk
ln -s "$VULKAN_SDK/lib/libMoltenVK.dylib" "$VULKAN_SDK/lib/libvulkan.dylib"
export VK_ICD_FILENAMES=$VULKAN_SDK/share/vulkan/icd.d/MoltenVK_icd.json
export LLVM_DIR=$(brew --prefix)/opt/llvm@16

git clone --recurse-submodules https://github.com/RPCS3/rpcs3
cd rpcs3

sed -i '' "s/extern const double NSAppKitVersionNumber;/const double NSAppKitVersionNumber = 1343;/g" 3rdparty/hidapi/hidapi/mac/hid.c

mkdir build && cd build
cmake .. -DPNG_ARM_NEON=on -DUSE_ALSA=OFF -DUSE_PULSE=OFF -DUSE_AUDIOUNIT=ON -DUSE_NATIVE_INSTRUCTIONS=OFF -DUSE_SYSTEM_FFMPEG=on -DCMAKE_OSX_ARCHITECTURES="arm64" -DLLVM_TARGETS_TO_BUILD="AArch64;ARM" -GNinja -DUSE_SYSTEM_MVK=on -DUSE_FAUDIO=OFF

# -DUSE_FAUDIO=OFF
# This will prevent a warning after compiling

ninja && codesign --force --deep --sign - bin/rpcs3.app/Contents/MacOS/rpcs3

@DarthMDev DarthMDev force-pushed the arm64_mac_ci branch 3 times, most recently from 3e394c8 to 677d2d7 Compare June 16, 2023 06:25
.ci/deploy-mac.sh Outdated Show resolved Hide resolved
.ci/build-mac-arm64.sh Outdated Show resolved Hide resolved
.ci/build-mac-arm64.sh Outdated Show resolved Hide resolved
.ci/build-mac-arm64.sh Outdated Show resolved Hide resolved
.ci/build-mac-arm64.sh Outdated Show resolved Hide resolved
.ci/build-mac-arm64.sh Outdated Show resolved Hide resolved
.ci/build-mac-arm64.sh Outdated Show resolved Hide resolved
@DarthMDev DarthMDev mentioned this pull request Jun 26, 2023
@Megamouse Megamouse added the Build and CI Anything related to the build process and continuous integration label Jun 30, 2023
@DarthMDev
Copy link
Contributor Author

anyone have any ideas whats going on with homebrew to cause
Error: Fetching /opt/homebrew/Library/Taps/homebrew/homebrew-core failed!

@DarthMDev DarthMDev force-pushed the arm64_mac_ci branch 4 times, most recently from 7d6c442 to 7d75916 Compare July 4, 2023 19:35
This also optimizes the build-mac script
Reduces from 1 hour + to less than 30 minutes

Co-Authored-By: UltraHDR <108294295+UltraHDR@users.noreply.github.com>
Co-Authored-By: shinra-electric <50119606+shinra-electric@users.noreply.github.com>
.cirrus.yml Outdated Show resolved Hide resolved
@shinra-electric
Copy link
Contributor

I'm getting a library not loaded error, even though the dylib is packaged.

Termination Reason:    Namespace DYLD, Code 1 Library missing
Library not loaded: @loader_path/../../../../opt/sdl2/lib/libSDL2-2.0.0.dylib
Referenced from: <E87FD9F9-BBD6-322F-9670-CEA913D8DC25> /Volumes/VOLUME/*/RPCS3.app/Contents/Frameworks/libFAudio.0.dylib

@shinra-electric
Copy link
Contributor

shinra-electric commented Aug 2, 2023

Actually, since the problem is FAudio dylib, why not just disable it with -DUSE_FAUDIO=OFF?

FAudio is ignored in Windows builds (see #14128) , and it's not necessary for macOS (Cubeb works fine).

Edit: removing FAudio would also have the added benefit of reducing downloading & build times

Edit 2: Well, I think FAudio is ignored on Windows, though that code looks like it's just not updating the submodule. Regardless, it's not required on macOS

Edit 3: I've removed the code suggestions about removing FAudio (though that is still an option), since I noticed a couple of issues with build-mac.sh

.ci/deploy-mac.sh Outdated Show resolved Hide resolved
.ci/deploy-mac.sh Outdated Show resolved Hide resolved
Co-Authored-By: shinra-electric <50119606+shinra-electric@users.noreply.github.com>
Co-Authored-By: Margen67 <Margen67@users.noreply.github.com>
@shinra-electric
Copy link
Contributor

Maybe have a look at what Nas did in #14563, that PR fixes a similar issue on master.

@hcorion
Copy link
Member

hcorion commented Oct 4, 2023

FYI we've moved away from Cirrus for our CI (other than FreeBSD) because of their new limits.

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 this pull request may close these issues.

[Feature request] Add macOS arm64 to Cirrus CI
6 participants