-
Notifications
You must be signed in to change notification settings - Fork 3
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) #25
Draft
siggmo
wants to merge
24
commits into
develop
Choose a base branch
from
feature/macOS_M1_support
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 12 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
639f0d2
First draft of macOS support in CMakeLists and Github Actions recipe …
siggmo 28b16b6
fix typo in FFTW package name for brew
siggmo 06fed09
Rename macOS workflow to not clash with the Ubuntu workflow
siggmo 5670265
test if OpenMP is really required at all
siggmo f3e52ea
Remove not used dependency OpenMP
siggmo 2a9ccbd
Merge branch 'bugfix/remove-openmp-dependency' into feature/macOS_M1_…
siggmo 6cfc2a0
Test if setting C++ standard to 11 helps with the whitespace required…
siggmo 9d3970b
Test if setting C++ standard to 14 helps with auto not allowed in lam…
siggmo 05272cd
Test brew hdf5 package without mpi
siggmo ffd4955
Add macOS installation instructions
siggmo 32bd02a
Test both brew packages hdf5 and hdf5-mpi at the same time (conflicti…
siggmo 8672551
Revert "Test both brew packages hdf5 and hdf5-mpi at the same time (c…
siggmo 120f4a4
Add libomp to macOS dependency installation instructions
siggmo 9415190
Merge branch 'develop' into feature/macOS_M1_support
siggmo 026dffe
Revert "Remove not used dependency OpenMP"
siggmo 8e72fd2
Add libomp to github action
siggmo ec0c126
Set OpenMP_ROOT in github action recipe to enable CMake on macOS to f…
siggmo b82d5d9
test explicit path to libomp instead
siggmo 7164b6e
Revert "test explicit path to libomp instead"
siggmo 7323793
Merge branch 'develop' into feature/macOS_M1_support
siggmo 019fcde
try another fix for OpenMP problem
siggmo c8bd9a9
add missing backslash in multiline command
siggmo f6a550d
remove cmake from brew install commands as it's included in macos-14 …
siggmo cc551c4
Mention OpenMP macOS issue with CMake in the README
siggmo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
name: Build and Test macOS 14 (M1) | ||
# Builds FANS for macOS 14 on M1 CPU and runs the tests. | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- develop | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.event_name }}-${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: ${{github.event_name == 'pull_request'}} | ||
|
||
jobs: | ||
build: | ||
name: macOS 14 (M1) | ||
runs-on: macos-14 | ||
env: | ||
FANS_BUILD_DIR: build | ||
strategy: | ||
fail-fast: false | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install FANS dependencies | ||
run: brew install cmake hdf5 openmpi eigen fftw | ||
|
||
- name: Generate build directory | ||
run: mkdir -p ${{ env.FANS_BUILD_DIR }} | ||
|
||
- name: Configure | ||
working-directory: ${{ env.FANS_BUILD_DIR }} | ||
run: | | ||
cmake --version | ||
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXPORT_COMPILE_COMMANDS=ON .. | ||
|
||
- uses: actions/upload-artifact@v4 | ||
if: failure() | ||
with: | ||
name: macOS 14 (M1) CMakeCache | ||
path: ${{ env.FANS_BUILD_DIR }}/CMakeCache.txt | ||
- uses: actions/upload-artifact@v4 | ||
if: failure() | ||
with: | ||
name: macOS 14 (M1) CMakeLogs | ||
path: '${{ env.FANS_BUILD_DIR }}/CMakeFiles/*.log' | ||
- uses: actions/upload-artifact@v4 | ||
if: failure() | ||
with: | ||
name: macOS 14 (M1) CompileCommands | ||
path: ${{ env.FANS_BUILD_DIR }}/compile_commands.json | ||
|
||
- name: Compile | ||
working-directory: ${{ env.FANS_BUILD_DIR }} | ||
run: | ||
cmake --build . -j $(nproc) || cmake --build . -j1 | ||
|
||
- name: Tests | ||
working-directory: ${{ env.FANS_BUILD_DIR }} | ||
env: | ||
CTEST_OUTPUT_ON_FAILURE: 1 | ||
run: ctest | ||
|
||
- uses: actions/upload-artifact@v4 | ||
if: failure() | ||
with: | ||
name: macOS 14 (M1) CTest logs | ||
path: ${{ env.FANS_BUILD_DIR }}/Testing/Temporary/LastTest.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change seems to be unrelated to this pull request. Please revert.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is part of the remove OpenMP dependency PR. I merged it into this PR to make it work temporarily.