-
Notifications
You must be signed in to change notification settings - Fork 2
265 lines (261 loc) · 9.63 KB
/
test.yaml
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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
name: CI
on:
push:
branches:
- main
pull_request:
# make sure steps are run in a login shell to support Lmod modules
defaults:
run:
shell: bash -l {0}
jobs:
cpuimage:
uses: ./.github/workflows/docker-cpu.yaml
secrets:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
style:
runs-on: ubuntu-20.04
needs: [cpuimage]
container:
image: pecosut/tps_env:latest
options: --user 1001 --privileged
name: Code style
steps:
- name: Cancel previous runs
uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ github.token }}
- name: Checkout code
uses: actions/checkout@v3
- name: Bootstrap
run: ./bootstrap
- name: Configure
run: ./configure
- name: Style check
run: make style
build:
runs-on: ubuntu-20.04
needs: [cpuimage]
container:
image: pecosut/tps_env:latest
options: --user 1001 --privileged
name: Build/CPU
steps:
- name: Cancel previous runs
uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ github.token }}
- name: Checkout code
uses: actions/checkout@v3
with:
lfs: true
- name: Query modules loaded
run: module list
- name: Bootstrap
run: ./bootstrap
- name: Configure
run: ./configure CXXFLAGS="-g -O2 -Wall -Werror -fdiagnostics-color=always" --enable-pybind11
- name: Make
run: make -j 2
- name: Tests
run: make AM_COLOR_TESTS=yes check || (cat test/*.log; exit 1)
- name: Distclean
run: make distclean
- name: VPATH configure
run: mkdir build; cd build; ../configure CXXFLAGS="-g -O2 -Wall -Werror -fdiagnostics-color=always"
- name: VPATH make
run: cd build; make -j 2
- name: VPATH tests
run: cd build; make AM_COLOR_TESTS=yes check || (cat test/*.log; exit 1)
build-gpu:
runs-on: [self-hosted, linux, x64, gpu, marvin-cuda]
name: Build/GPU (Cuda)
env:
MFEM_DIR: /home/oliver/sw/mfem-4.5.2-cuda
MASA_DIR: /home/oliver/sw/masa
steps:
- name: Cancel previous runs
uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ github.token }}
- name: Checkout code
uses: actions/checkout@v3
with:
lfs: true
- name: MFEM Tree
run: echo "MFEM_DIR=$MFEM_DIR"
- name: Query modules loaded
run: module restore tps-gpu-gnu9; module list
- name: Bootstrap
run: module restore tps-gpu-gnu9; ./bootstrap
- name: Configure
run: module restore tps-gpu-gnu9; ./configure --enable-pybind11 --enable-gpu-cuda CUDA_ARCH=sm_75 USER_CUDA_CXXFLAGS="-Werror all-warnings -Xcompiler=-Wall -Xcompiler=-Werror"
- name: Make
run: module restore tps-gpu-gnu9; make -j 2
- name: Tests
run: module restore tps-gpu-gnu9; make AM_COLOR_TESTS=yes check || (cat test/*.log; exit 1)
build-hip:
runs-on: [self-hosted, linux, x64, gpu, hip]
name: Build/GPU (AMD/HIP)
env:
MFEM_DIR: /home/oliver/sw/mfem-4.5.2-hip
steps:
- name: Cancel previous runs
uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ github.token }}
- name: Checkout code
uses: actions/checkout@v3
with:
lfs: true
- name: Set ROCm path
run: echo '/opt/rocm/bin' >>"${GITHUB_PATH}"
- name: MFEM Tree
run: echo "MFEM_DIR=$MFEM_DIR"
- name: Query modules loaded
run: module restore tps-gpu; module list
- name: Bootstrap
run: module restore tps-gpu; ./bootstrap
- name: Configure
run: module restore tps-gpu; ./configure CXXFLAGS="-Wall -Wno-gpu-maybe-wrong-side -Wno-unused-private-field -Wno-pessimizing-move -Werror" --enable-pybind11 --enable-gpu-hip HIP_ARCH=gfx803
- name: Make
run: module restore tps-gpu; make -j 2
- name: Distclean
run: make distclean
- name: VPATH configure
run: mkdir build; cd build; module restore tps-gpu; ../configure --enable-pybind11 --enable-gpu-hip HIP_ARCH=gfx803
- name: VPATH make
run: cd build; module restore tps-gpu; make -j 2
build-gpu-cpu:
runs-on: [self-hosted, linux, x64, gpu, hip]
name: Build/GPU-CPU
env:
MFEM_DIR: /home/oliver/sw/mfem-4.5.2-cpu
steps:
- name: Cancel previous runs
uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ github.token }}
- name: Checkout code
uses: actions/checkout@v3
with:
lfs: true
- name: MFEM Tree
run: echo "MFEM_DIR=$MFEM_DIR"
- name: Query modules loaded
run: module restore tps-gpu-cpu; module list
- name: Bootstrap
run: module restore tps-gpu-cpu; ./bootstrap
- name: Configure
run: module restore tps-gpu-cpu; ./configure CXXFLAGS="-g -O2 -Wall -Wno-nonnull -Werror" --enable-pybind11 --enable-gpu-cpu
- name: Make
run: module restore tps-gpu-cpu; make -j 2
- name: Tests
run: module restore tps-gpu-cpu; make AM_COLOR_TESTS=yes check || (cat test/*.log; exit 1)
- name: Distclean
run: make distclean
- name: VPATH configure
run: mkdir build; cd build; module restore tps-gpu-cpu; ../configure CXXFLAGS="-g -O2 -Wall -Wno-nonnull -Werror" --enable-pybind11 --enable-gpu-cpu
- name: VPATH make
run: cd build; module restore tps-gpu-cpu; make -j 2
- name: VPATH tests
run: cd build; module restore tps-gpu-cpu; make AM_COLOR_TESTS=yes check || (cat test/*.log; exit 1)
distbuild:
runs-on: ubuntu-20.04
needs: [cpuimage]
container:
image: pecosut/tps_env:latest
options: --user 1001 --privileged
name: Create dist tarball
steps:
- name: Cancel previous runs
uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ github.token }}
- name: Checkout code
uses: actions/checkout@v3
with:
lfs: true
- name: Bootstrap
run: ./bootstrap
- name: Configure
run: ./configure CXXFLAGS="-g -O2 -Wall -Werror -fdiagnostics-color=always"
- name: Dist
run: make dist
- name: Archive tarball
uses: actions/upload-artifact@v3
with:
name: tarball-${{ github.event.pull_request.head.sha }}
path: tps-*.tar.gz
disttest-cpu:
runs-on: ubuntu-20.04
needs: [cpuimage,distbuild]
container:
image: pecosut/tps_env:latest
options: --user 1001 --privileged
name: CPU release tarball tests
steps:
- name: Cancel previous runs
uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ github.token }}
- name: Access tarball
uses: actions/download-artifact@v3
with:
name: tarball-${{ github.event.pull_request.head.sha }}
- name: Expand
run: tar xfz tps-*.tar.gz; rm tps-*.tar.gz
- name: Configure
run: cd tps-*; ./configure
- name: Make
run: cd tps-*; make -j 2
- name: TPS version
run: cd tps-*; ./src/tps --version
- name: Tests
run: cd tps-*; make AM_COLOR_TESTS=yes check || (cat test/*.log; exit 1)
- name: Distclean
run: cd tps-*; make distclean
- name: VPATH configure
run: cd tps-*; mkdir build; cd build; ../configure CXXFLAGS="-g -O2 -Wall -Werror -fdiagnostics-color=always"
- name: VPATH make
run: cd tps-*; cd build; make -j 2
- name: VPATH tests
run: cd tps-*; cd build; make AM_COLOR_TESTS=yes check || (cat test/*.log; exit 1)
disttest-gpu:
runs-on: [self-hosted, linux, x64, gpu, marvin-cuda]
needs: distbuild
name: GPU/Cuda release tarball tests
env:
MFEM_DIR: /home/oliver/sw/mfem-4.5.2-cuda
steps:
- name: Cancel previous runs
uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ github.token }}
- name: Access tarball
uses: actions/download-artifact@v3
with:
name: tarball-${{ github.event.pull_request.head.sha }}
- name: Expand
run: tar xfz tps-*.tar.gz; rm tps-*.tar.gz
- name: MFEM Tree
run: echo "MFEM_INC=$MFEM_INC, MFEM_LIB=$MFEM_LIB"
- name: Query modules loaded
run: module restore tps-gpu-gnu9; module list
- name: Configure
run: cd tps-*; module restore tps-gpu-gnu9; ./configure --enable-pybind11 --enable-gpu-cuda CUDA_ARCH=sm_75 USER_CUDA_CXXFLAGS="-Werror all-warnings -Xcompiler=-Wall -Xcompiler=-Werror"
- name: Make
run: cd tps-*; module restore tps-gpu-gnu9; make -j 2
- name: TPS version
run: cd tps-*; module restore tps-gpu-gnu9; ./src/tps --version
- name: Tests
run: cd tps-*; module restore tps-gpu-gnu9; make AM_COLOR_TESTS=yes check || (cat test/*.log; exit 1)
- name: Distclean
run: cd tps-*; make distclean
- name: VPATH configure
run: cd tps-*; mkdir build; cd build; module restore tps-gpu-gnu9; ../configure --enable-gpu-cuda CUDA_ARCH=sm_75
- name: VPATH Make
run: cd tps-*; cd build; module restore tps-gpu-gnu9; make -j 2
- name: VPATH Tests
run: cd tps-*; cd build; module restore tps-gpu-gnu9; make AM_COLOR_TESTS=yes check || (cat test/*.log; exit 1)