Skip to content

Doc: Update License Notice #402

Doc: Update License Notice

Doc: Update License Notice #402

Workflow file for this run

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/mp4py work-around, see
# https://github.com/mpi4py/mpi4py/pull/159
# https://github.com/mpi4py/mpi4py/issues/157#issuecomment-1001022274
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/bin
/usr/local/lib
/usr/local/share
/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 adios2
brew install ccache
brew install cmake
brew install hdf5-mpi
brew install libomp
brew link --force libomp
brew install ninja
brew install open-mpi
brew install pkg-config
python3 -m pip install --upgrade pip setuptools wheel pytest
python3 -m pip install --upgrade pytest
python3 -m pip install -r requirements_mpi.txt
python3 -m pip install -r examples/requirements.txt
python3 -m pip install --upgrade openPMD-validator
set -e
- 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/ABLASTR.cmake') }}
restore-keys: |
ccache-macos-appleclang-${{ hashFiles('.github/workflows/macos.yml') }}-
ccache-macos-appleclang-
- name: build ImpactX
run: |
cmake -S . -B build \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DImpactX_PYTHON=ON \
-DPython_EXECUTABLE=$(which python3)
cmake --build build -j 3
- name: run tests
run: |
ctest --test-dir build --output-on-failure -E pytest.AMReX
- name: run installed python module
run: |
cmake --build build --target pip_install
python3 examples/fodo/run_fodo.py
- name: run installed app
run: |
sudo cmake --build build --target install
impactx.MPI.OMP.DP.OPMD examples/fodo/input_fodo.in algo.particle_shape = 1 || \
{ cat Backtrace.0.0; exit 1; }
impactx.MPI.OMP.DP.OPMD examples/fodo/input_fodo.in algo.particle_shape = 2 || \
{ cat Backtrace.0.0; exit 1; }
impactx.MPI.OMP.DP.OPMD examples/fodo/input_fodo.in algo.particle_shape = 3 || \
{ cat Backtrace.0.0; exit 1; }
- name: validate created openPMD files
run: find build -name *.h5 | xargs -n1 -I{} openPMD_check_h5 -i {}