forked from MITgcm/MITgcm
-
Notifications
You must be signed in to change notification settings - Fork 2
255 lines (217 loc) · 7.43 KB
/
build_testing.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
name: build
on:
push:
pull_request:
jobs:
forward:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- exp: "offline_exf_seaice"
- exp: "global_ocean.cs32x15"
- exp: "tutorial_deep_convection"
- exp: "aim.5l_cs"
- exp: "isomip"
- exp: "global_ocean.90x40x15"
- exp: "tutorial_plume_on_slope"
- exp: "tutorial_advection_in_gyre"
- exp: "hs94.cs-32x32x5"
- exp: "tutorial_global_oce_biogeo"
- exp: "tutorial_global_oce_in_p"
- exp: "tutorial_cfc_offline"
continue-on-error: true
steps:
- name: Checkout
uses: actions/[email protected]
- name: Get a docker image and set it running
run: |
docker pull oliverjahn/testreport-images:ubuntu_18_04_villon
docker run -v `pwd`:/MITgcm --name ubuntu_18_04-testreport -t -d oliverjahn/testreport-images:ubuntu_18_04_villon /bin/bash
- name: Run a test
env:
MITGCM_EXP: ${{ matrix.exp }}
run: |
. tools/ci/runtr.sh
- name: Upload diagstats
uses: actions/upload-artifact@v2
with:
name: diagstats
path: verification/*/*run*/*StDiag*
if-no-files-found: ignore
- name: Upload mds output
uses: actions/upload-artifact@v2
with:
name: mds
path: verification/global_ocean.90x40x15/run/pickup.ckptA*
if-no-files-found: ignore
- name: Upload mnc output
uses: actions/upload-artifact@v2
with:
name: mnc
path: verification/*/*run*/mnc_test_*/*.nc
if-no-files-found: ignore
python:
needs: forward
runs-on: ubuntu-latest
strategy:
matrix:
python: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9]
include:
- python: 2.7
env: py27
- python: 3.5
env: py35
- python: 3.6
env: py36
- python: 3.7
env: py37
- python: 3.8
env: py38
- python: 3.9
env: py39
continue-on-error: true
steps:
- name: Checkout
uses: actions/[email protected]
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Install Tox and other packages
run: |
pip install --upgrade pip
pip install tox
- name: Install netcdf tools
run: |
sudo apt-get update
sudo apt-get -qq install netcdf-bin
- name: Download diagstats output
uses: actions/download-artifact@v2
with:
name: diagstats
path: utils/python/MITgcmutils/diagstats
- name: Download mds output
uses: actions/download-artifact@v2
with:
name: mds
path: utils/python/MITgcmutils/tests/data/global_ocean.90x40x15
- name: Download mnc output
uses: actions/download-artifact@v2
with:
name: mnc
path: utils/python/MITgcmutils/tests/data
- name: Create download directories
run: mkdir -p baseline_images data/llc90 data/aste data/eccov3
working-directory: utils/python/MITgcmutils/tests
- name: Download baseline images
uses: wei/[email protected]
with:
args: https://engaging-web.mit.edu/~jahn/MITgcmutils/baseline_images/{cs_pcol,cs_pcol_sphere,cs_pcol_sphere_pre330,llc_contour,llc_contourf,llc_pcol,llc_pcol_basemap,llc_pcol_stere,llc_pcol_xg}.png -o utils/python/MITgcmutils/tests/baseline_images/#1.png
- name: Download mds test data
uses: wei/[email protected]
with:
args: https://engaging-web.mit.edu/~jahn/MITgcmutils/mds/llc90/{Eta.0000000008,hFacC,XC,XG,YC,YG}.{data,meta} -o utils/python/MITgcmutils/tests/data/llc90/#1.#2
- name: Download aste test data
uses: wei/[email protected]
with:
args: https://engaging-web.mit.edu/~jahn/MITgcmutils/mnc/aste/grid.t0{01,02,04,05,07,08,10,11,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,36,37,38,39,41,42,43,44,45}.nc -o utils/python/MITgcmutils/tests/data/aste/grid.t0#1.nc
- name: Download eccov3 test data
uses: wei/[email protected]
with:
args: https://engaging-web.mit.edu/~jahn/MITgcmutils/mnc/eccov3/dic_tave.0000025920.t[001-032].nc -o utils/python/MITgcmutils/tests/data/eccov3/dic_tave.0000025920.t#1.nc
- name: Run Tox
run: tox -e ${{ matrix.env }}
working-directory: utils/python/MITgcmutils
- name: Run scripts
run: tests/run-scripts ${{ matrix.env }}
working-directory: utils/python/MITgcmutils
- name: Upload gluemncbig output
uses: actions/upload-artifact@v2
with:
name: gluemncbig
path: utils/python/MITgcmutils/*.nc
if: ${{ always() }}
openad:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- exp: "global_ocean.90x40x15"
continue-on-error: true
steps:
- name: Checkout
uses: actions/[email protected]
- name: Get a docker image and set it running
run: |
docker pull mitgcm/mitgcm-openad-test:centos-test
docker run -i -t -v `pwd`:/MITgcm -d --name openad-testing --ulimit stack=-1:-1 --rm mitgcm/mitgcm-openad-test:centos-test /bin/bash
- name: Run testreport
env:
MITGCM_EXP: ${{ matrix.exp }}
MITGCM_DECMD: "docker exec -i openad-testing bash -lc"
MITGCM_TROPT: "-oad -devel -of=../tools/build_options/linux_amd64_gfortran -match 14"
MITGCM_INPUT_DIR_PAT: '/input_oad.*'
run: |
. tools/ci/runtr.sh
openad-other:
runs-on: ubuntu-latest
if: ${{ contains(github.event.pull_request.labels.*.name, 'adjoint') }}
strategy:
matrix:
include:
- exp: "global_oce_latlon"
- exp: "halfpipe_streamice"
- exp: "hs94.1x64x5"
- exp: "isomip"
- exp: "tutorial_global_oce_biogeo"
- exp: "tutorial_global_oce_optim"
- exp: "tutorial_tracer_adjsens"
continue-on-error: true
steps:
- name: Checkout
uses: actions/[email protected]
- name: Get a docker image and set it running
run: |
docker pull mitgcm/mitgcm-openad-test:centos-test
docker run -i -t -v `pwd`:/MITgcm -d --name openad-testing --ulimit stack=-1:-1 --rm mitgcm/mitgcm-openad-test:centos-test /bin/bash
- name: Run testreport
env:
MITGCM_EXP: ${{ matrix.exp }}
MITGCM_DECMD: "docker exec -i openad-testing bash -lc"
MITGCM_TROPT: "-oad -devel -of=../tools/build_options/linux_amd64_gfortran -match 14"
MITGCM_INPUT_DIR_PAT: '/input_oad.*'
run: |
. tools/ci/runtr.sh
doc_html:
runs-on: ubuntu-latest
continue-on-error: true
steps:
- name: Checkout
uses: actions/[email protected]
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.11
- name: install dependencies
run: tools/ci/install_doc_dependencies.sh
- name: build docs
run: |
cd doc
sphinx-build -Wa -b html -d _build_doctrees . _build/html
doc_latex:
runs-on: ubuntu-latest
continue-on-error: true
steps:
- name: Checkout
uses: actions/[email protected]
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.11
- name: install dependencies
run: tools/ci/install_doc_dependencies.sh
- name: build docs
run: |
cd doc
make clean latexpdf LATEXOPTS="-interaction=nonstopmode -halt-on-error"