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

CI: macOS #874

Merged
merged 8 commits into from
Mar 1, 2023
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 75 additions & 0 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: 🍏 macOS

on: [push, pull_request]

concurrency:
group: ${{ github.ref }}-${{ github.head_ref }}-macos
cancel-in-progress: true

jobs:
build_appleclang:
name: AppleClang
runs-on: macos-latest
if: github.event.pull_request.draft == false
env:
CXXFLAGS: "-Werror -Wno-error=pass-failed"
# For macOS, Ninja is slower than the default:
#CMAKE_GENERATOR: Ninja
SETUPTOOLS_USE_DISTUTILS: stdlib
steps:
- uses: actions/checkout@v3
- name: Brew Cache
uses: actions/cache@v3
# - once stored under a key, they become immutable (even if local cache path content changes)
# - for a refresh the key has to change, e.g., hash of a tracked file in the key
with:
path: |
/usr/local
/Users/runner/Library/Caches/Homebrew
key: brew-macos-appleclang-${{ hashFiles('.github/workflows/macos.yml') }}
restore-keys: |
brew-macos-appleclang-
- name: install dependencies
run: |
brew --cache
set +e
brew unlink gcc
brew update
brew install --overwrite python
brew install ccache
brew install fftw
brew install libomp
brew link --force libomp
brew install ninja
brew install open-mpi
brew install pkg-config
set -e
brew tap openpmd/openpmd
brew install openpmd-api
ax3l marked this conversation as resolved.
Show resolved Hide resolved
- name: CCache Cache
uses: actions/cache@v3
# - once stored under a key, they become immutable (even if local cache path content changes)
# - for a refresh the key has to change, e.g., hash of a tracked file in the key
with:
path: /Users/runner/Library/Caches/ccache
key: ccache-macos-appleclang-${{ hashFiles('.github/workflows/macos.yml') }}-${{ hashFiles('cmake/dependencies/AMReX.cmake') }}
restore-keys: |
ccache-macos-appleclang-${{ hashFiles('.github/workflows/macos.yml') }}-
ccache-macos-appleclang-
- name: build HiPACE++
run: |
cmake -S . -B build_dp \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DHiPACE_openpmd_internal=OFF
cmake --build build_dp -j 2

cmake -S . -B build_sp \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DHiPACE_openpmd_internal=OFF \
-DHiPACE_PRECISION=SINGLE
cmake --build build_sp -j 2

- name: test HiPACE++
run: |
ctest --test-dir build_dp --output-on-failure
ctest --test-dir build_sp --output-on-failure
ax3l marked this conversation as resolved.
Show resolved Hide resolved