Harris Sheet development merge 230802 #2153
Workflow file for this run
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
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 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 | |
- 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 WarpX | |
run: | | |
cmake -S . -B build_dp \ | |
-DCMAKE_VERBOSE_MAKEFILE=ON \ | |
-DWarpX_EB=ON \ | |
-DWarpX_OPENPMD=ON \ | |
-DWarpX_openpmd_internal=OFF | |
cmake --build build_dp -j 3 | |
cmake -S . -B build_sp \ | |
-DCMAKE_VERBOSE_MAKEFILE=ON \ | |
-DWarpX_EB=ON \ | |
-DWarpX_LIB=ON \ | |
-DWarpX_OPENPMD=ON \ | |
-DWarpX_openpmd_internal=OFF \ | |
-DWarpX_PRECISION=SINGLE | |
cmake --build build_sp -j 3 | |
python3 -m pip install --upgrade pip setuptools wheel | |
export WARPX_MPI=ON | |
PYWARPX_LIB_DIR=$PWD/build_sp/lib python3 -m pip wheel . | |
python3 -m pip install *.whl | |
- name: run pywarpx | |
run: | | |
export OMP_NUM_THREADS=1 | |
mpirun -n 2 Examples/Physics_applications/laser_acceleration/PICMI_inputs_3d.py |