-
Notifications
You must be signed in to change notification settings - Fork 45
288 lines (237 loc) · 7.68 KB
/
main.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
name: CI Tests
on:
pull_request:
types: [opened, synchronize, reopened]
# Do not run if the only files changed cannot affect the build
paths-ignore:
- "**.md"
- "**.MD"
- "LICENCE"
- "COPYRIGHT"
# This is a weekly run to try and keep the MPI caches ... cached
schedule:
- cron: '00 13 * * 1'
jobs:
GNU:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04, ubuntu-24.04, macos-13, macos-14]
compiler: [gfortran-12, gfortran-13, gfortran-14]
# gfortran-10 and -11 are only on ubuntu-22.04
# gfortran-13 and -14 are not on ubuntu-22.04
include:
- os: ubuntu-22.04
compiler: gfortran-10
- os: ubuntu-22.04
compiler: gfortran-11
exclude:
- os: ubuntu-22.04
compiler: gfortran-13
- os: ubuntu-22.04
compiler: gfortran-14
# fail-fast if set to 'true' here is good for production, but when
# debugging, set to 'false'. fail-fast means if *any* ci test in the matrix fails
# GitHub Actions will stop any other test immediately. So good for production, bad
# when trying to figure something out. For more info see:
# https://www.edwardthomson.com/blog/github_actions_6_fail_fast_matrix_workflows.html
fail-fast: false
env:
FC: ${{ matrix.compiler }}
LANGUAGE: en_US.UTF-8
LC_ALL: en_US.UTF-8
LANG: en_US.UTF-8
LC_TYPE: en_US.UTF-8
OMPI_ALLOW_RUN_AS_ROOT: 1
OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1
OMPI_MCA_btl_vader_single_copy_mechanism: none
name: ${{ matrix.os }} / ${{ matrix.compiler }}
steps:
- name: Compiler Versions
run: |
${FC} --version
cmake --version
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Set all directories as git safe
run: |
git config --global --add safe.directory '*'
- name: Cache MPI
id: cache-mpi
uses: actions/cache@v4
with:
path: ~/local/openmpi
key: mpi-${{ runner.os }}-${{ matrix.os }}-${{ matrix.compiler }}
- name: Build MPI
if: steps.cache-mpi.outputs.cache-hit != 'true'
run: |
sh ${GITHUB_WORKSPACE}/tools/ci-install-mpi.sh openmpi 5.0.2
- name: Set MPI Environment
run: |
echo "${HOME}/local/openmpi/bin" >> $GITHUB_PATH
echo "LD_LIBRARY_PATH=${HOME}/local/openmpi/lib" >> $GITHUB_ENV
echo "DYLD_LIBRARY_PATH=${HOME}/local/openmpi/lib" >> $GITHUB_ENV
- name: MPI Versions
run: |
${FC} --version
mpirun --version
mpifort --show
- name: Configure pFUnit
run: cmake -B build
- name: Build pfUnit
run: cmake --build build --parallel 4
- name: Build Tests
run: |
cmake --build build --parallel 4 --target build-tests
cmake --build build --parallel 4 --target tests
- name: Run Ctest
run: ctest --test-dir build --parallel 1 --output-on-failure --repeat until-pass:4
- name: Archive log files on failure
uses: actions/upload-artifact@v4
if: failure()
with:
name: logfiles
path: |
build/**/*.log
Intel:
runs-on: ubuntu-22.04
env:
FC: ifx
CC: icx
name: Intel Fortran
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Set all directories as git safe
run: |
git config --global --add safe.directory '*'
- name: Setup Intel oneAPI repository
run: |
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
sudo add-apt-repository "deb https://apt.repos.intel.com/oneapi all main"
sudo apt-get update
- name: Install Intel oneAPI compilers
timeout-minutes: 5
run: sudo apt-get install intel-oneapi-compiler-fortran intel-oneapi-compiler-dpcpp-cpp
# optional
- name: Install Intel MPI
timeout-minutes: 5
run: sudo apt-get install intel-oneapi-mpi intel-oneapi-mpi-devel
- name: Setup Intel oneAPI environment
run: |
source /opt/intel/oneapi/setvars.sh
printenv >> $GITHUB_ENV
printenv | grep intel
- name: Versions
run: |
${FC} --version
${CC} --version
mpirun --version
cmake --version
- name: Configure pFUnit
run: cmake -B build
- name: Build pfUnit
run: cmake --build build --parallel
- name: Build Tests
run: |
cmake --build build --parallel 4 --target build-tests
cmake --build build --parallel 4 --target tests
- name: Run Ctest
run: ctest --test-dir build --parallel 1 --output-on-failure --repeat until-pass:4
- name: Archive log files on failure
uses: actions/upload-artifact@v4
if: failure()
with:
name: logfiles
path: |
build/**/*.log
Nvidia:
runs-on: ubuntu-22.04
container: nvcr.io/nvidia/nvhpc:24.7-devel-cuda12.5-ubuntu22.04
env:
FC: nvfortran
name: Nvidia HPC
steps:
- name: Versions
run: |
${FC} --version
cmake --version
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Set all directories as git safe
run: |
git config --global --add safe.directory '*'
- name: Add python-is-python3 package
run: |
apt-get update
apt-get install -y python-is-python3
- name: Configure pFUnit
run: cmake -B build
- name: Build pfUnit
run: cmake --build build --parallel
- name: Build Tests
run: |
cmake --build build --parallel 4 --target build-tests
cmake --build build --parallel 4 --target tests
- name: Run Ctest
run: ctest --test-dir build --parallel 1 --output-on-failure --repeat until-pass:4
- name: Archive log files on failure
uses: actions/upload-artifact@v4
if: failure()
with:
name: logfiles
path: |
build/**/*.log
Flang:
runs-on: ubuntu-latest
container: gmao/llvm-flang-openmpi:latest
env:
FC: flang-new
LANGUAGE: en_US.UTF-8
LC_ALL: en_US.UTF-8
LANG: en_US.UTF-8
LC_TYPE: en_US.UTF-8
OMPI_ALLOW_RUN_AS_ROOT: 1
OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1
OMPI_MCA_btl_vader_single_copy_mechanism: none
name: Flang
steps:
- name: Versions
run: |
${FC} --version
cmake --version
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Set all directories as git safe
run: |
git config --global --add safe.directory '*'
- name: Add python-is-python3 package
run: |
apt-get update
apt-get install -y python-is-python3
- name: Configure pFUnit
run: cmake -B build
- name: Build pfUnit
run: cmake --build build --parallel
- name: Build Tests
run: |
cmake --build build --parallel 4 --target build-tests
cmake --build build --parallel 4 --target tests
- name: Run Ctest
run: ctest --test-dir build --parallel 1 --output-on-failure --repeat until-pass:4
- name: Archive log files on failure
uses: actions/upload-artifact@v4
if: failure()
with:
name: logfiles
path: |
build/**/*.log