-
Notifications
You must be signed in to change notification settings - Fork 196
104 lines (92 loc) · 3.01 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
102
103
104
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"
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: TRUE
# For macOS, Ninja is slower than the default:
#CMAKE_GENERATOR: Ninja
steps:
- uses: actions/checkout@v4
- name: install dependencies
run: |
set +e
brew unlink gcc
brew update
brew upgrade || true
brew install --overwrite python
brew install ccache
brew install fftw
brew install libomp
brew link --overwrite --force libomp
brew install ninja
brew install open-mpi
brew install pkg-config
set -e
brew tap openpmd/openpmd
brew install openpmd-api
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade virtualenv
python3 -m venv py-venv
source py-venv/bin/activate
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade build packaging setuptools wheel
python3 -m pip install --upgrade mpi4py
- name: CCache Cache
uses: actions/cache@v4
with:
path: /Users/runner/Library/Caches/ccache
key: ccache-${{ github.workflow }}-${{ github.job }}-git-${{ github.sha }}
restore-keys: |
ccache-${{ github.workflow }}-${{ github.job }}-git-
- name: build WarpX
run: |
export CCACHE_COMPRESS=1
export CCACHE_COMPRESSLEVEL=10
export CCACHE_MAXSIZE=100M
export CCACHE_DEPEND=1
ccache -z
source py-venv/bin/activate
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 \
-DPython_EXECUTABLE=$(which python3) \
-DWarpX_EB=ON \
-DWarpX_PYTHON=ON \
-DWarpX_OPENPMD=ON \
-DWarpX_openpmd_internal=OFF \
-DWarpX_PRECISION=SINGLE
cmake --build build_sp -j 3
cmake --build build_sp --target pip_install
ccache -s
- name: run pywarpx
run: |
source py-venv/bin/activate
export OMP_NUM_THREADS=1
mpirun -n 2 Examples/Physics_applications/laser_acceleration/PICMI_inputs_3d.py
save_pr_number:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Save PR number
env:
PR_NUMBER: ${{ github.event.number }}
run: |
echo $PR_NUMBER > pr_number.txt
- uses: actions/upload-artifact@v4
with:
name: pr_number
path: pr_number.txt
retention-days: 1