-
Notifications
You must be signed in to change notification settings - Fork 20
64 lines (57 loc) · 1.69 KB
/
continuous-integration.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
name: Continuous Integration
on: [push, pull_request]
jobs:
CI:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
cxx-compiler: [gcc]
env:
CC: ${{ matrix.cxx-compiler }}
CXX: ${{ matrix.cxx-compiler }}
RRTMGP_ROOT: ${{ github.workspace }}
RRTMGP_DATA: ${{ github.workspace }}/rrtmgp-data
steps:
#
# Checks-out repository under $GITHUB_WORKSPACE
#
- uses: actions/checkout@v3
with:
submodules: recursive
#
# Synchronize the package index
#
- name: Synchronize the package index
run: sudo apt-get update
- name: Install dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -y gfortran libnetcdf-dev cmake libboost-dev python3-pip python3-setuptools nco
sudo apt-get install ${{ matrix.cxx-compiler }}
pip3 install --user numpy netcdf4 dask[array] xarray
- name: Build
run: |
mkdir build
cd build
cmake -DSYST=ubuntu_22lts ..
make
- name: Run tests
run: |
cd rfmip
./make_links.sh
ln -sf ../build/test_rte_rrtmgp .
python3 stage_files.py
python3 rfmip_init.py
python3 rfmip_run.py
cd ../allsky
./make_links.sh
ln -sf ../build/test_rte_rrtmgp .
python3 allsky_init.py
python3 allsky_run.py
- name: Check results
run: |
cd rfmip
python3 compare-to-reference.py --ref_dir ../rrtmgp-data/examples/rfmip-clear-sky/reference --var rld rlu rsd rsu --file r??_Efx_RTE-RRTMGP-181204_rad-irf_r1i1p1f1_gn.nc --failure_threshold=7.e-4
cd ../allsky
python3 allsky_check.py