-
Notifications
You must be signed in to change notification settings - Fork 15
168 lines (160 loc) · 5.85 KB
/
ubuntu.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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
name: 🐧 OpenMP
on: [push, pull_request]
concurrency:
group: ${{ github.ref }}-${{ github.head_ref }}-ubuntu
cancel-in-progress: true
jobs:
build_cxxminimal:
name: GCC Minimal w/o MPI
runs-on: ubuntu-20.04
if: github.event.pull_request.draft == false
env:
CXXFLAGS: "-Werror"
steps:
- uses: actions/checkout@v3
- name: install dependencies
run: |
.github/workflows/dependencies/gcc.sh
- 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: |
~/.ccache
~/.cache/ccache
key: ccache-openmp-cxxminimal-${{ hashFiles('.github/workflows/ubuntu.yml') }}-${{ hashFiles('cmake/dependencies/AMReX.cmake') }}
restore-keys: |
ccache-openmp-cxxminimal-${{ hashFiles('.github/workflows/ubuntu.yml') }}-
ccache-openmp-cxxminimal-
- name: build WarpX
run: |
cmake -S . -B build_3D \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DWarpX_EB=OFF \
-DWarpX_MPI=OFF \
-DWarpX_QED=OFF
cmake --build build_3D -j 2
cmake -S . -B build_3D_EM \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DWarpX_EB=OFF \
-DWarpX_MPI=OFF \
-DWarpX_QED=OFF \
-DWarpX_MAG_LLG=OFF
cmake --build build_3D_EM -j 2
build_1D_2D:
name: GCC 1D & 2D w/ MPI
runs-on: ubuntu-22.04
if: github.event.pull_request.draft == false
env:
CXXFLAGS: "-Werror"
CXX: "g++-12"
CC: "gcc-12"
steps:
- uses: actions/checkout@v3
- name: install dependencies
run: |
.github/workflows/dependencies/gcc12.sh
- 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: |
~/.ccache
~/.cache/ccache
key: ccache-openmp-1D-2D-${{ hashFiles('.github/workflows/ubuntu.yml') }}-${{ hashFiles('cmake/dependencies/AMReX.cmake') }}
restore-keys: |
ccache-openmp-1D-2D-${{ hashFiles('.github/workflows/ubuntu.yml') }}-
ccache-openmp-1D-2D-
- name: build WarpX
run: |
cmake -S . -B build_1D \
-GNinja \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DWarpX_DIMS=1 \
-DWarpX_EB=OFF \
-DWarpX_MAG_LLG=OFF \
-DWarpX_PSATD=ON \
-DWarpX_QED_TABLE_GEN=ON
cmake --build build_1D -j 2
cmake -S . -B build_2D \
-GNinja \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DWarpX_DIMS=2 \
-DWarpX_EB=OFF \
-DWarpX_MAG_LLG=OFF \
-DWarpX_PSATD=ON \
-DWarpX_QED_TABLE_GEN=ON
cmake --build build_2D -j 2
build_gcc_ablastr:
name: GCC ABLASTR w/o MPI
runs-on: ubuntu-20.04
if: github.event.pull_request.draft == false
env:
CMAKE_GENERATOR: Ninja
CXXFLAGS: "-Werror"
steps:
- uses: actions/checkout@v3
- name: install dependencies
run: |
.github/workflows/dependencies/gcc.sh
sudo apt-get install -y libopenmpi-dev openmpi-bin
- 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: |
~/.ccache
~/.cache/ccache
key: ccache-openmp-gccablastr-${{ hashFiles('.github/workflows/ubuntu.yml') }}-${{ hashFiles('cmake/dependencies/AMReX.cmake') }}
restore-keys: |
ccache-openmp-gccablastr-${{ hashFiles('.github/workflows/ubuntu.yml') }}-
ccache-openmp-gccablastr-
- name: build WarpX
run: |
cmake -S . -B build \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DWarpX_APP=OFF \
-DWarpX_LIB=OFF
cmake --build build -j 2
build_pyfull:
name: Clang pywarpx
runs-on: ubuntu-20.04
if: github.event.pull_request.draft == false
env:
# On CI for this test, 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: install dependencies
run: |
.github/workflows/dependencies/pyfull.sh
- 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: |
~/.ccache
~/.cache/ccache
key: ccache-openmp-pyfull-${{ hashFiles('.github/workflows/ubuntu.yml') }}-${{ hashFiles('cmake/dependencies/AMReX.cmake') }}
restore-keys: |
ccache-openmp-pyfull-${{ hashFiles('.github/workflows/ubuntu.yml') }}-
ccache-openmp-pyfull-
- name: build WarpX
run: |
python3 -m pip install --upgrade pip setuptools wheel
export WARPX_MPI=ON
export WARPX_OPENPMD=ON
export WARPX_PSATD=ON
export WARPX_QED_TABLE_GEN=ON
export CC=$(which clang)
export CXX=$(which clang++)
export CXXFLAGS="-Werror -Wno-error=pass-failed"
python3 -m pip install -v .