etternagame / etterna

Advanced cross-platform rhythm game focused on keyboard play
https://etternaonline.com/
MIT License
474 stars 132 forks source link

Allow for native Apple M1 ARM builds! #1298

Closed bluebandit21 closed 3 months ago

bluebandit21 commented 3 months ago

In 2020, Apple introduced their own ARM chip, the M1, which replaced the Intel x86_64 chips they had been using. Consequently, all modern macs run on ARM processors and run ARM code.

Etterna has only been able to work on them because Apple provided Rosetta v2, a translation layer allowing our x86_64 mac builds to be dynamically JIT-d into ARM code, which can be run.

However, this JIT process has some overhead and produces less efficient code than code compiled for the target processor in the first place, and more importantly Rosetta v2 will have support dropped for it at some point in the future.

This PR allows Etterna to be built for Apple Silicon targets, and is an important first step in the process of automatically generating Apple-Silicon-compatible releases.

The other two major components are telling GHA to build for Apple Silicion targets, and notarizing our executable so it can actually be distributed (see: #1292)

Depends-on: #1297 , as without it Etterna will not compile for macOS at all, even for a x86_64 target.