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

Automatically build Apple ARM builds in CI #1300

Merged
merged 7 commits into from
Mar 12, 2024

Conversation

bluebandit21
Copy link
Member

Depends-on: #1298 , as without it Etterna can't be built for M1 macs.

TODO: The applications this CI generates are not signed or notarized, which will cause problems. (See: #1292 )
The next step is to automatically sign the applications made by this CI when we make a release.

The version of the macOS sdk we're using doesn't implement it,
 see more detailed in-code comment included in this commit
First (pretty obviously), don't set the preprocessor
 define "CPU_X86_64" if we're not actually targeting
 x86_64 :)

Secondly, don't set some linker flags that seem to
 cause problems on aarch64 builds -- with them
 present, launching the binary under lldb exits with
 "Malformed Mach-O file" and regular launches fail
 with mysterious error codes.
-- Having tested myself, it seems to work just fine
 without them set; I believe that even for x86_64
 they were added by accident! (See in-code comment)
If we're targeting a native M1 aarch64 build, obviously we don't
 want to tell FFMpeg to build for x86_64 :)
It doesn't make set a deployment target earlier than the first OS
 that actually supports the CPU :)
We only actually use cpuid.h on Linux, and including it causes
 a problem for M1 builds because it doesn't exist outside x86_64!
The calc code uses x86_64 SIMD instrinsics for speed.
However, those are unavailable on ARM.

SSE2Neon provides ARM equivalents of each missing instruction
 using ARM's Neon SIMD instructions, providing equivalent
 speed for the majority of x86_64 SIMD instructions :)
Have the CI automatically create M1 mac builds.
Python2.7 building is removed because Python2.7 errors when trying
 to build on ARM, and Python3 building was changed to build a later
 Python version because Python3.8 is not available for ARM.

TODO: Crashpad doesn't seem to want to work with ARM macs,
 figure out how to fix this later.
@nico-abram
Copy link
Member

At a skim LGTM, great work Blue :)

@poco0317 poco0317 merged commit 0f92fa6 into etternagame:develop Mar 12, 2024
5 of 12 checks passed
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