-
Notifications
You must be signed in to change notification settings - Fork 130
86 lines (82 loc) · 3.57 KB
/
pyFV3-ci.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
name: NASA/NOAA pyFV3 repository build test
on:
push:
branches: [ master, ci-fix ]
pull_request:
branches: [ master, ci-fix ]
workflow_dispatch:
defaults:
run:
shell: bash
jobs:
build_and_validate_pace:
# if: "!contains(github.event.pull_request.labels.*.name, 'no-ci')"
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8.12]
steps:
- uses: actions/checkout@v2
with:
repository: 'GEOS-ESM/PyFV3'
ref: 'ci/DaCe'
submodules: 'recursive'
path: 'pyFV3'
- uses: actions/checkout@v2
with:
path: 'dace'
submodules: 'recursive'
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install library dependencies
run: |
sudo apt-get install libopenmpi-dev libboost-all-dev gcc-13
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 13
gcc --version
# Because Github doesn't allow us to do a git checkout in code
# we use a trick to checkout DaCe first (not using the external submodule)
# install the full suite via requirements_dev, then re-install the correct DaCe
- name: Install Python packages
run: |
python -m pip install --upgrade pip wheel setuptools
pip install -e ./pyFV3[ndsl]
pip install -e ./dace
- name: Download data
run: |
cd pyFV3
mkdir -p test_data
cd test_data
wget https://portal.nccs.nasa.gov/datashare/astg/smt/pace-regression-data/8.1.3_c12_6ranks_standard.D_SW.tar.gz
tar -xzvf 8.1.3_c12_6ranks_standard.D_SW.tar.gz
wget https://portal.nccs.nasa.gov/datashare/astg/smt/pace-regression-data/8.1.3_c12_6ranks_standard.RiemSolverC.tar.gz
tar -xzvf 8.1.3_c12_6ranks_standard.RiemSolverC.tar.gz
wget https://portal.nccs.nasa.gov/datashare/astg/smt/pace-regression-data/8.1.3_c12_6ranks_standard.Remapping.tar.gz
tar -xzvf 8.1.3_c12_6ranks_standard.Remapping.tar.gz
cd ../..
- name: "Regression test: Riemman Solver on C-grid"
run: |
export FV3_DACEMODE=BuildAndRun
export PACE_CONSTANTS=GFS
pytest -v -s --data_path=./pyFV3/test_data/8.1.3/c12_6ranks_standard/dycore \
--backend=dace:cpu --which_modules=Riem_Solver_C \
--threshold_overrides_file=./pyFV3/tests/savepoint/translate/overrides/standard.yaml \
./pyFV3/tests/savepoint
- name: "Regression test: D-grid shallow water lagrangian dynamics (D_SW) (on rank 0 only)"
run: |
export FV3_DACEMODE=BuildAndRun
export PACE_CONSTANTS=GFS
pytest -v -s --data_path=./pyFV3/test_data/8.1.3/c12_6ranks_standard/dycore \
--backend=dace:cpu --which_modules=D_SW --which_rank=0 \
--threshold_overrides_file=./pyFV3/tests/savepoint/translate/overrides/standard.yaml \
./pyFV3/tests/savepoint
- name: "Regression test: Remapping (on rank 0 only)"
run: |
export FV3_DACEMODE=BuildAndRun
export PACE_CONSTANTS=GFS
cd pace
pytest -v -s --data_path=./pyFV3/test_data/8.1.3/c12_6ranks_standard/dycore \
--backend=dace:cpu --which_modules=Remapping --which_rank=0 \
--threshold_overrides_file=./pyFV3/tests/savepoint/translate/overrides/standard.yaml \
./pyFV3/fv3core/tests/savepoint