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 support for MacOS with ARM CPUs (CMake + GitHub Action) #21

Open
siggmo opened this issue Sep 9, 2024 · 2 comments · May be fixed by #25
Open

Add support for MacOS with ARM CPUs (CMake + GitHub Action) #21

siggmo opened this issue Sep 9, 2024 · 2 comments · May be fixed by #25

Comments

@siggmo
Copy link
Collaborator

siggmo commented Sep 9, 2024

So far, we had indirect support for MacOS arm64 machines like the MacBook Air with M1 CPU by providing linux/arm64 Docker images. That however in turn required emulation on the GitHub Actions runners as they run on x86 CPUs. This required to use explicit Docker calls in the workflows, and worse, hugely increased build and test times as emulation is very slow.

Now we decided to stop maintaining linux/arm64 support (at least until there are native linux/arm64 runners available for GitHub Actions). Instead we would like to natively support MacOS on ARM, for which there are runners available (macos-latest).

To Do

  • Determine exact dependencies on MacOS on arm64 and how to install them
  • Adapt CMake recipe for MacOS (dependency checking, RPATH settings, compiler?, installation procedure, packaging, ...)
  • Create a build and test GitHub Actions workflow for MacOS
  • Possibly changes to the source code itself (?)
  • Did I forget something?
@fsimonis
Copy link

fsimonis commented Sep 16, 2024

Hi there from preCICE 👋

You could have a look at the preCICE CI workflow for building on macOS. We initially used it with a self-hosted runner, but later switched to the GitHub runner due to reliability issues.

This workflow uses brew to install necessary dependencies including MPI and PETSc and uses apple-clang for compilation. It tests both Debug and Release.

We didn't need to change anything for the macOS version. In fact the macOS tests sporadically failed due to hidden problems which didn't show in the Linux builds. We also didn't notice when GitHub upgraded the macos-latest runners to the ARM chips.

@siggmo
Copy link
Collaborator Author

siggmo commented Sep 19, 2024

Hi, thanks for the input, that's very helpful! And sounds encouraging that you didn't have to change anything in the CMake recipe!

IshaanDesai pushed a commit that referenced this issue Sep 21, 2024
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 a pull request may close this issue.

2 participants