-
Notifications
You must be signed in to change notification settings - Fork 20
101 lines (88 loc) · 3.4 KB
/
macos.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
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:
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: TRUE
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: '3.x'
- name: install brew dependencies
run: |
set +e
brew unlink gcc
brew update
brew install adios2
brew install ccache
brew install cmake
brew install fftw
brew install hdf5-mpi
brew install libomp
brew link --overwrite --force libomp
brew install ninja
brew install open-mpi
brew install pkg-config
set -e
- name: install pip dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade build packaging setuptools wheel pytest
python3 -m pip install --upgrade -r requirements_mpi.txt
python3 -m pip install --upgrade -r src/python/impactx/dashboard/requirements.txt
python3 -m pip install --upgrade -r examples/requirements.txt
python3 -m pip install --upgrade -r tests/python/requirements.txt
python3 -m pip install --upgrade pipx
python3 -m pipx install openPMD-validator
- name: CCache Cache
uses: actions/cache@v4
# - 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: |
export CCACHE_COMPRESS=1
export CCACHE_COMPRESSLEVEL=10
export CCACHE_MAXSIZE=100M
export CCACHE_SLOPPINESS=time_macros
ccache -z
export CXXFLAGS="-Werror -Wno-error=pass-failed"
cmake -S . -B build \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DImpactX_FFT=ON \
-DImpactX_PYTHON=ON
cmake --build build -j 3
du -hs ~/Library/Caches/ccache
ccache -s
- 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
export DYLD_LIBRARY_PATH=/usr/local/lib:${DYLD_LIBRARY_PATH}
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 {}