-
Notifications
You must be signed in to change notification settings - Fork 113
383 lines (341 loc) · 10.2 KB
/
Linux_versions.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
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
# UFS_UTILS test workflow.
#
# Check different versions of the NCEPLIBS libraries that are used by UFS_UTILS.
#
# Ed Hartnett 12/13/22
name: Linux_versions
on:
push:
branches:
- develop
paths-ignore:
- README.md
pull_request:
branches:
- develop
paths-ignore:
- README.md
defaults:
run:
shell: bash -exo pipefail {0}
jobs:
Linux_versions:
runs-on: ubuntu-latest
env:
FC: mpifort
CC: mpicc
FCFLAGS: -fallow-argument-mismatch
strategy:
fail-fast: true
matrix:
esmf_version: [8_2_0, 8.3.0, 8.4.0]
bacio_version: [2.4.1]
g2_version: [3.4.3]
sp_version: [2.3.3]
ip_version: [3.3.3]
w3nco_version: [2.4.0]
nemsio_version: [2.5.0]
sfcio_version: [1.4.0]
sigio_version: [2.3.0]
steps:
- name: install-dependencies
run: |
sudo apt-get update
sudo apt-get install libpng-dev zlib1g-dev libjpeg-dev libmpich-dev
sudo apt-get install libnetcdf-dev libnetcdff-dev netcdf-bin pkg-config
sudo apt-get install autoconf automake libtool
- name: checkout-esmf
id: cache-esmf
uses: actions/cache@v2
with:
path: ~/esmf
key: Linux_versions-esmf-${{ matrix.esmf_version }}-${{ runner.os }}
- name: build-esmf
if: steps.cache-esmf.outputs.cache-hit != 'true'
run: |
pushd ~
if [[ ${{ matrix.esmf_version }} == "8_2_0" ]]; then
wget https://github.com/esmf-org/esmf/archive/ESMF_${{ matrix.esmf_version }}.tar.gz &> /dev/null
tar zxf ESMF_${{ matrix.esmf_version }}.tar.gz
cd esmf-ESMF_${{ matrix.esmf_version }}
export ESMF_DIR=~/esmf-ESMF_${{ matrix.esmf_version }}
else
wget https://github.com/esmf-org/esmf/archive/refs/tags/v${{ matrix.esmf_version }}.tar.gz &> /dev/null
ls -l
tar zxf v${{ matrix.esmf_version }}.tar.gz
cd esmf-${{ matrix.esmf_version }}
export ESMF_DIR=~/esmf-${{ matrix.esmf_version }}
fi
export ESMF_COMM=mpich3
export ESMF_INSTALL_BINDIR=bin
export ESMF_INSTALL_LIBDIR=lib
export ESMF_INSTALL_MODDIR=mod
export ESMF_COMPILER=gfortran
export ESMF_INSTALL_PREFIX=~/esmf
export ESMF_NETCDF=split
export ESMF_NETCDF_INCLUDE=/usr/include
export ESMF_NETCDF_LIBPATH=/usr/x86_64-linux-gnu
export ESMF_PIO=OFF
export ESMF_MOAB=OFF
export ESMF_ARRAY_LITE=TRUE
make -j2
make install
- name: cache-jasper
id: cache-jasper
uses: actions/cache@v2
with:
path: ~/jasper
key: Linux_versions-jasper-${{ runner.os }}-2.0.33-1
- name: checkout-jasper
if: steps.cache-jasper.outputs.cache-hit != 'true'
uses: actions/checkout@v2
with:
repository: jasper-software/jasper
path: jasper
ref: version-2.0.33
- name: build-jasper
if: steps.cache-jasper.outputs.cache-hit != 'true'
run: |
cd jasper
mkdir build-jasper && cd build-jasper
cmake .. -DCMAKE_INSTALL_PREFIX=~/jasper
make -j2
make install
- name: cache-bacio
id: cache-bacio
uses: actions/cache@v2
with:
path: ~/bacio
key: Linux_versions-bacio-${{ runner.os }}-${{ matrix.bacio_version }}
- name: checkout-bacio
if: steps.cache-bacio.outputs.cache-hit != 'true'
uses: actions/checkout@v2
with:
repository: NOAA-EMC/NCEPLIBS-bacio
path: bacio
ref: v${{ matrix.bacio_version }}
- name: build-bacio
if: steps.cache-bacio.outputs.cache-hit != 'true'
run: |
cd bacio
mkdir build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=~/bacio
make -j2
make install
- name: cache-g2
id: cache-g2
uses: actions/cache@v2
with:
path: ~/g2
key: Linux_versions-g2-${{ runner.os }}-${{ matrix.g2_version }}
- name: checkout-g2
if: steps.cache-g2.outputs.cache-hit != 'true'
uses: actions/checkout@v2
with:
repository: NOAA-EMC/NCEPLIBS-g2
path: g2
ref: v${{ matrix.g2_version }}
- name: build-g2
if: steps.cache-g2.outputs.cache-hit != 'true'
run: |
cd g2
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=~/g2 -DCMAKE_PREFIX_PATH="~/bacio;~/jasper" ..
make -j2
make install
- name: cache-sp
id: cache-sp
uses: actions/cache@v2
with:
path: ~/sp
key: Linux_versions-sp-${{ runner.os }}-${{ matrix.sp_version }}
- name: checkout-sp
if: steps.cache-sp.outputs.cache-hit != 'true'
uses: actions/checkout@v2
with:
repository: NOAA-EMC/NCEPLIBS-sp
path: sp
ref: v${{ matrix.sp_version }}
- name: build-sp
if: steps.cache-sp.outputs.cache-hit != 'true'
run: |
cd sp
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=~/sp
make -j2
make install
- name: cache-ip
id: cache-ip
uses: actions/cache@v2
with:
path: ~/ip
key: Linux_versions-ip-${{ runner.os }}-${{ matrix.ip_version }}
- name: checkout-ip
if: steps.cache-ip.outputs.cache-hit != 'true'
uses: actions/checkout@v2
with:
repository: NOAA-EMC/NCEPLIBS-ip
path: ip
ref: v${{ matrix.ip_version }}
- name: build-ip
if: steps.cache-ip.outputs.cache-hit != 'true'
run: |
cd ip
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=~/ip -DCMAKE_PREFIX_PATH=~/sp ..
make -j2
make install
# - name: checkout-w3emc
# uses: actions/checkout@v2
# with:
# repository: NOAA-EMC/NCEPLIBS-w3emc
# path: w3emc
# ref: develop
# - name: build-w3emc
# run: |
# cd w3emc
# mkdir build
# cd build
# cmake -DCMAKE_PREFIX_PATH=~/bacio -DCMAKE_INSTALL_PREFIX=~/w3emc ..
# make -j2
# make install
# - name: checkout-g2c
# uses: actions/checkout@v2
# with:
# repository: NOAA-EMC/NCEPLIBS-g2c
# path: g2c
# ref: develop
# - name: build-g2c
# run: |
# cd g2c
# mkdir build
# cd build
# cmake .. -DCMAKE_INSTALL_PREFIX=~/g2c -DJasper_ROOT=~/jasper
# make -j2
# make install
- name: cache-sfcio
id: cache-sfcio
uses: actions/cache@v2
with:
path: ~/sfcio
key: Linux_versions-sfcio-${{ runner.os }}-${{ matrix.sfcio_version }}
- name: checkout-sfcio
if: steps.cache-sfcio.outputs.cache-hit != 'true'
uses: actions/checkout@v2
with:
repository: NOAA-EMC/NCEPLIBS-sfcio
path: sfcio
ref: v${{ matrix.sfcio_version }}
- name: build-sfcio
if: steps.cache-sfcio.outputs.cache-hit != 'true'
run: |
cd sfcio
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=~/sfcio
make -j2
make install
- name: cache-w3nco
id: cache-w3nco
uses: actions/cache@v2
with:
path: ~/w3nco
key: Linux_versions-w3nco-${{ runner.os }}-${{ matrix.w3nco_version }}
- name: checkout-w3nco
if: steps.cache-w3nco.outputs.cache-hit != 'true'
uses: actions/checkout@v2
with:
repository: NOAA-EMC/NCEPLIBS-w3nco
path: w3nco
ref: v${{ matrix.w3nco_version }}
- name: build-w3nco
if: steps.cache-w3nco.outputs.cache-hit != 'true'
run: |
cd w3nco
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=~/w3nco
make -j2
make install
- name: cache-nemsio
id: cache-nemsio
uses: actions/cache@v2
with:
path: ~/nemsio
key: Linux_versions-nemsio-${{ runner.os }}-${{ matrix.nemsio_version }}
- name: checkout-nemsio
if: steps.cache-nemsio.outputs.cache-hit != 'true'
uses: actions/checkout@v2
with:
repository: NOAA-EMC/NCEPLIBS-nemsio
path: nemsio
ref: v${{ matrix.nemsio_version }}
- name: build-nemsio
if: steps.cache-nemsio.outputs.cache-hit != 'true'
run: |
cd nemsio
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=~/nemsio -DCMAKE_PREFIX_PATH="~/bacio;~/w3nco" ..
make -j2
make install
- name: cache-sigio
id: cache-sigio
uses: actions/cache@v2
with:
path: ~/sigio
key: Linux_versions-sigio-${{ runner.os }}-${{ matrix.sigio_version }}
- name: checkout-sigio
if: steps.cache-sigio.outputs.cache-hit != 'true'
uses: actions/checkout@v2
with:
repository: NOAA-EMC/NCEPLIBS-sigio
path: sigio
ref: v${{ matrix.sigio_version }}
- name: build-sigio
if: steps.cache-sigio.outputs.cache-hit != 'true'
run: |
cd sigio
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=~/sigio
make -j2
make install
- name: checkout
uses: actions/checkout@v2
with:
path: ufs_utils
submodules: true
- name: cache-data
id: cache-data
uses: actions/cache@v2
with:
path: ~/data
key: data-1
- name: build
run: |
set -x
cd ufs_utils
mkdir build
cd build
export ESMFMKFILE=~/esmf/lib/esmf.mk
cmake -DTEST_FILE_DIR=/home/runner/data -DCMAKE_PREFIX_PATH="~/jasper;~/g2c;~/bacio;~/g2;~/w3nco;~/sfcio;~/sigio;~/nemsio;~/sp;~/ip" ..
make -j2 VERBOSE=1
- name: test
run: |
cd ufs_utils/build
ctest --verbose --rerun-failed --output-on-failure
- name: cache-data
if: steps.cache-data.outputs.cache-hit != 'true'
run: |
mkdir ~/data
cp ufs_utils/build/tests/chgres_cube/data/* ~/data
cp ufs_utils/build/tests/sfc_climo_gen/data/* ~/data
cp ufs_utils/build/tests/cpld_gridgen/data/* ~/data
cp ufs_utils/tests/filter_topo/data/* ~/data
cp ufs_utils/tests/emcsfc_snow2mdl/data/* ~/data
cp ufs_utils/tests/chgres_cube/data/* ~/data
ls -l ~/data