forked from merzlab/QUICK
-
Notifications
You must be signed in to change notification settings - Fork 0
343 lines (340 loc) · 13.4 KB
/
build_test_serial.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
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
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
name: 'Build and Test QUICK Serial Version'
defaults:
run:
shell: bash
on:
push:
paths-ignore:
- '**.md'
pull_request:
paths-ignore:
- '**.md'
jobs:
build-and-test-serial-legacy-configure-make:
strategy:
fail-fast: false
matrix:
include:
- os: 'ubuntu-22.04'
compiler-type: 'gnu'
compiler-version: '10'
c-compiler: 'gcc'
cxx-compiler: 'g++'
fortran-compiler: 'gfortran'
compiler-install: 'gcc-10 g++-10 gfortran-10'
- os: 'ubuntu-22.04'
compiler-type: 'gnu'
compiler-version: '11'
c-compiler: 'gcc'
cxx-compiler: 'g++'
fortran-compiler: 'gfortran'
compiler-install: 'gcc-11 g++-11 gfortran-11'
- os: 'ubuntu-24.04'
compiler-type: 'gnu'
compiler-version: '12'
c-compiler: 'gcc'
cxx-compiler: 'g++'
fortran-compiler: 'gfortran'
compiler-install: 'gcc-12 g++-12 gfortran-12'
- os: 'ubuntu-24.04'
compiler-type: 'gnu'
compiler-version: '13'
c-compiler: 'gcc'
cxx-compiler: 'g++'
fortran-compiler: 'gfortran'
compiler-install: 'gcc-13 g++-13 gfortran-13'
- os: 'ubuntu-24.04'
compiler-type: 'gnu'
compiler-version: '14'
c-compiler: 'gcc'
cxx-compiler: 'g++'
fortran-compiler: 'gfortran'
compiler-install: 'gcc-14 g++-14 gfortran-14'
- os: 'ubuntu-24.04-arm'
compiler-type: 'gnu'
compiler-version: '14'
c-compiler: 'gcc'
cxx-compiler: 'g++'
fortran-compiler: 'gfortran'
compiler-install: 'gcc-14 g++-14 gfortran-14'
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }} - Serial - Legacy - ${{ matrix.compiler-type }} - ${{ matrix.compiler-version }}
steps:
- name: 'Checkout Repository'
uses: actions/checkout@v4
- name: 'Linux: Install Dependencies for Serial Version'
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get -y install ${{ matrix.compiler-install }} parallel
if [[ ${{ matrix.compiler-type }} == 'gnu' || ${{ matrix.compiler-type }} == 'clang' ]]; then
sudo rm /usr/bin/${{ matrix.c-compiler }}
sudo ln -s -T ${{ matrix.c-compiler }}-${{ matrix.compiler-version }} /usr/bin/${{ matrix.c-compiler }}
sudo rm /usr/bin/${{ matrix.cxx-compiler }}
sudo ln -s -T ${{ matrix.cxx-compiler }}-${{ matrix.compiler-version }} /usr/bin/${{ matrix.cxx-compiler }}
if [[ ${{ matrix.compiler-type }} == 'gnu' ]]; then
sudo rm /usr/bin/${{ matrix.fortran-compiler }}
sudo ln -s -T ${{ matrix.fortran-compiler }}-${{ matrix.compiler-version }} /usr/bin/${{ matrix.fortran-compiler }}
fi
fi
- name: 'Linux: Log Softare Environment Configuration'
if: runner.os == 'Linux'
run: |
echo "OS version:"
cat /etc/os-release
echo
echo "Kernel version:"
uname -a
echo
ldd --version
echo
echo "Fortran compiler version:"
${{ matrix.fortran-compiler }} --version
echo
echo "GNU Parallel version:"
parallel --version
- name: 'Setup Environment Variables for Building and Running Tests'
run: |
echo "QUICK_HOME=$PWD/install" >> "$GITHUB_ENV"
echo "PARALLEL_TEST_COUNT=2" >> "$GITHUB_ENV"
echo "CC=${{ matrix.c-compiler }}" >> "$GITHUB_ENV"
echo "CXX=${{ matrix.cxx-compiler }}" >> "$GITHUB_ENV"
echo "FC=${{ matrix.fortran-compiler }}" >> "$GITHUB_ENV"
- name: 'Configure Serial Version'
run: |
./configure --serial --enablef --prefix $PWD/install \
${{ matrix.compiler-type }}
- name: 'Build and Install Serial Version Using 2 Jobs'
run: |
make -j2 all install
- name: 'Run Tests for Serial Version (Make)'
run: |
make fulltest
- name: 'Upload Test Artifacts for Serial Version'
if: always()
uses: actions/upload-artifact@v4
with:
name: serial-legacy-configure-make-tests-${{ matrix.os }}-${{ matrix.compiler-type }}-${{ matrix.compiler-version }}
path: ${{ github.workspace }}/install/test/runs/serial
retention-days: 3
compression-level: 6
- name: 'Download Test Artifacts for Serial Version'
uses: actions/download-artifact@v4
with:
name: serial-legacy-configure-make-tests-${{ matrix.os }}-${{ matrix.compiler-type }}-${{ matrix.compiler-version }}
- name: 'Display Artifacts'
run: |
ls -R
build-and-test-serial-cmake:
strategy:
fail-fast: false
matrix:
include:
- os: 'ubuntu-22.04'
compiler-type: 'GNU'
compiler-version: '10'
c-compiler: 'gcc'
cxx-compiler: 'g++'
fortran-compiler: 'gfortran'
compiler-install: 'gcc-10 g++-10 gfortran-10'
- os: 'ubuntu-22.04'
compiler-type: 'GNU'
compiler-version: '11'
c-compiler: 'gcc'
cxx-compiler: 'g++'
fortran-compiler: 'gfortran'
compiler-install: 'gcc-11 g++-11 gfortran-11'
- os: 'ubuntu-24.04'
compiler-type: 'GNU'
compiler-version: '12'
c-compiler: 'gcc'
cxx-compiler: 'g++'
fortran-compiler: 'gfortran'
compiler-install: 'gcc-12 g++-12 gfortran-12'
- os: 'ubuntu-24.04'
compiler-type: 'GNU'
compiler-version: '13'
c-compiler: 'gcc'
cxx-compiler: 'g++'
fortran-compiler: 'gfortran'
compiler-install: 'gcc-13 g++-13 gfortran-13'
- os: 'ubuntu-24.04'
compiler-type: 'GNU'
compiler-version: '14'
c-compiler: 'gcc'
cxx-compiler: 'g++'
fortran-compiler: 'gfortran'
compiler-install: 'gcc-14 g++-14 gfortran-14'
- os: 'ubuntu-24.04'
compiler-type: 'CLANG'
compiler-version: '17'
c-compiler: 'clang'
cxx-compiler: 'clang++'
fortran-compiler: 'gfortran'
compiler-install: 'clang-17 gfortran'
- os: 'ubuntu-24.04'
compiler-type: 'CLANG'
compiler-version: '18'
c-compiler: 'clang'
cxx-compiler: 'clang++'
fortran-compiler: 'gfortran'
compiler-install: 'clang-18 gfortran'
- os: 'ubuntu-24.04-arm'
compiler-type: 'GNU'
compiler-version: '14'
c-compiler: 'gcc'
cxx-compiler: 'g++'
fortran-compiler: 'gfortran'
compiler-install: 'gcc-14 g++-14 gfortran-14'
- os: 'ubuntu-24.04-arm'
compiler-type: 'CLANG'
compiler-version: '18'
c-compiler: 'clang'
cxx-compiler: 'clang++'
fortran-compiler: 'gfortran'
compiler-install: 'clang-18 gfortran'
- os: 'macos-13'
compiler-type: 'GNU'
compiler-version: '14'
c-compiler: 'gcc'
cxx-compiler: 'g++'
fortran-compiler: 'gfortran'
compiler-install: 'gcc@14'
- os: 'macos-13'
compiler-type: 'CLANG'
compiler-version: '15'
c-compiler: 'clang'
cxx-compiler: 'clang++'
fortran-compiler: 'gfortran-14'
compiler-install: 'llvm@15 gcc@14'
- os: 'macos-14'
compiler-type: 'GNU'
compiler-version: '14'
c-compiler: 'gcc'
cxx-compiler: 'g++'
fortran-compiler: 'gfortran'
compiler-install: 'gcc@14'
- os: 'macos-14'
compiler-type: 'CLANG'
compiler-version: '15'
c-compiler: 'clang'
cxx-compiler: 'clang++'
fortran-compiler: 'gfortran-14'
compiler-install: 'llvm@15 gcc@14'
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }} - Serial - CMake - ${{ matrix.compiler-type }} - ${{ matrix.compiler-version }}
steps:
- name: 'Checkout Repository'
uses: actions/checkout@v4
- name: 'Linux: Install Dependencies for Serial Version'
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get -y install ${{ matrix.compiler-install }} \
cmake parallel
if [[ ${{ matrix.compiler-type }} == 'GNU' || ${{ matrix.compiler-type }} == 'CLANG' ]]; then
sudo rm /usr/bin/${{ matrix.c-compiler }}
sudo ln -s -T ${{ matrix.c-compiler }}-${{ matrix.compiler-version }} /usr/bin/${{ matrix.c-compiler }}
sudo rm /usr/bin/${{ matrix.cxx-compiler }}
sudo ln -s -T ${{ matrix.cxx-compiler }}-${{ matrix.compiler-version }} /usr/bin/${{ matrix.cxx-compiler }}
if [[ ${{ matrix.compiler-type }} == 'GNU' ]]; then
sudo rm /usr/bin/${{ matrix.fortran-compiler }}
sudo ln -s -T ${{ matrix.fortran-compiler }}-${{ matrix.compiler-version }} /usr/bin/${{ matrix.fortran-compiler }}
fi
fi
- name: 'MacOS: Install Dependencies for Serial Version'
if: runner.os == 'macOS'
run: |
brew install ${{ matrix.compiler-install }} cmake parallel
which ${{ matrix.c-compiler }}-${{ matrix.compiler-version }}
which ${{ matrix.cxx-compiler }}-${{ matrix.compiler-version }}
which ${{ matrix.fortran-compiler }}-${{ matrix.compiler-version }}
if [[ ${{ matrix.compiler-type }} == 'GNU' || ${{ matrix.compiler-type }} == 'CLANG' ]]; then
sudo ln -Fs /usr/local/bin/${{ matrix.c-compiler }}-${{ matrix.compiler-version }} /usr/local/bin/${{ matrix.c-compiler }}
sudo ln -Fs /usr/local/bin/${{ matrix.cxx-compiler }}-${{ matrix.compiler-version }} /usr/local/bin/${{ matrix.cxx-compiler }}
if [[ ${{ matrix.compiler-type }} == 'GNU' ]]; then
sudo ln -Fs /usr/local/bin/${{ matrix.fortran-compiler }}-${{ matrix.compiler-version }} /usr/local/bin/${{ matrix.fortran-compiler }}
fi
fi
- name: 'Linux: Log Softare Environment Configuration'
if: runner.os == 'Linux'
run: |
echo "OS version:"
cat /etc/os-release
echo
echo "Kernel version:"
uname -a
echo
ldd --version
echo
echo "Fortran compiler version:"
${{ matrix.fortran-compiler }} --version
echo
echo "CMake version:"
cmake --version
echo
echo "GNU Parallel version:"
parallel --version
- name: 'MacOS: Log Softare Environment Configuration'
if: runner.os == 'macOS'
run: |
echo "OS version:"
cat /System/Library/CoreServices/SystemVersion.plist
echo
echo "Kernel version:"
uname -a
echo
echo "Fortran compiler version:"
${{ matrix.fortran-compiler }} --version
echo
echo "CMake version:"
cmake --version
echo
echo "GNU Parallel version:"
parallel --version
- name: 'Linux: Setup Environment Variables for Building and Running Tests'
if: runner.os == 'Linux'
run: |
echo "QUICK_HOME=$PWD/install" >> "$GITHUB_ENV"
echo "PARALLEL_TEST_COUNT=2" >> "$GITHUB_ENV"
echo "CC=${{ matrix.c-compiler }}" >> "$GITHUB_ENV"
echo "CXX=${{ matrix.cxx-compiler }}" >> "$GITHUB_ENV"
echo "FC=${{ matrix.fortran-compiler }}" >> "$GITHUB_ENV"
- name: 'MacOS: Setup Environment Variables for Building and Running Tests'
if: runner.os == 'macOS'
run: |
echo "QUICK_HOME=$PWD/install" >> "$GITHUB_ENV"
echo "PARALLEL_TEST_COUNT=2" >> "$GITHUB_ENV"
echo "CC=${{ matrix.c-compiler }}" >> "$GITHUB_ENV"
echo "CXX=${{ matrix.cxx-compiler }}" >> "$GITHUB_ENV"
echo "FC=${{ matrix.fortran-compiler }}" >> "$GITHUB_ENV"
echo "PATH=/usr/local/bin:$PATH" >> "$GITHUB_ENV"
- name: 'Configure Serial Version'
run: |
mkdir build
cd build
cmake .. -DCOMPILER=${{ matrix.compiler-type }} \
-DENABLEF=TRUE -DCMAKE_INSTALL_PREFIX=$PWD/../install
- name: 'Build and Install Serial Version Using 2 Jobs'
run: |
cd build
cmake --build . --parallel 2
cmake --install .
- name: 'Run Tests for Serial Version'
run: |
cd install
./runtest --serial --full
- name: 'Upload Test Artifacts for Serial Version'
if: always()
uses: actions/upload-artifact@v4
with:
name: serial-cmake-tests-${{ matrix.os }}-${{ matrix.compiler-type }}-${{ matrix.compiler-version }}
path: ${{ github.workspace }}/install/test/runs/serial
retention-days: 3
compression-level: 6
- name: 'Download Test Artifacts for Serial Version'
uses: actions/download-artifact@v4
with:
name: serial-cmake-tests-${{ matrix.os }}-${{ matrix.compiler-type }}-${{ matrix.compiler-version }}
- name: 'Display Artifacts'
run: ls -R