Skip to content

Bunch of recent and less recent changes that I finally committed #35

Bunch of recent and less recent changes that I finally committed

Bunch of recent and less recent changes that I finally committed #35

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