Merge branch 'ufs-community:develop' into develop #20
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: debug-docs-test_coverage | |
on: [push, pull_request] | |
defaults: | |
run: | |
shell: bash -exo pipefail {0} | |
jobs: | |
debug-build-and-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: install-dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install libmpich-dev | |
sudo apt-get install doxygen | |
sudo apt-get install libpng-dev | |
sudo apt-get install libjpeg-dev | |
sudo apt-get install libnetcdf-dev libnetcdff-dev netcdf-bin pkg-config | |
python3 -m pip install gcovr | |
- name: cache-esmf | |
id: cache-esmf | |
uses: actions/cache@v2 | |
with: | |
path: ~/esmf | |
key: esmf-8.2.0-${{ runner.os }}3 | |
- name: build-esmf | |
if: steps.cache-esmf.outputs.cache-hit != 'true' | |
run: | | |
pushd ~ | |
export ESMF_DIR=~/esmf-ESMF_8_2_0 | |
wget https://github.com/esmf-org/esmf/archive/ESMF_8_2_0.tar.gz &> /dev/null | |
tar zxf ESMF_8_2_0.tar.gz | |
cd esmf-ESMF_8_2_0 | |
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 | |
make -j2 | |
make install | |
- name: cache-jasper | |
id: cache-jasper | |
uses: actions/cache@v2 | |
with: | |
path: ~/jasper | |
key: jasper-2.0.25-${{ runner.os }}3 | |
- name: build-jasper | |
if: steps.cache-jasper.outputs.cache-hit != 'true' | |
run: | | |
wget https://github.com/jasper-software/jasper/archive/version-2.0.25.tar.gz &> /dev/null | |
tar zxf version-2.0.25.tar.gz | |
cd jasper-version-2.0.25 | |
mkdir build-jasper && cd build-jasper | |
cmake .. -DCMAKE_INSTALL_PREFIX=~/jasper -DJAS_ENABLE_SHARED=OFF | |
make -j2 | |
make install | |
- name: cache-nceplibs | |
id: cache-nceplibs | |
uses: actions/cache@v2 | |
with: | |
path: ~/nceplibs | |
key: nceplibs-1.4.0-${{ runner.os }}3 | |
- name: build-nceplibs | |
if: steps.cache-nceplibs.outputs.cache-hit != 'true' | |
run: | | |
wget https://github.com/NOAA-EMC/NCEPLIBS/archive/v1.4.0.tar.gz &> /dev/null | |
tar zxf v1.4.0.tar.gz | |
cd NCEPLIBS-1.4.0 | |
export ESMFMKFILE=~/esmf/lib/esmf.mk | |
mkdir build && cd build | |
cmake .. -DCMAKE_PREFIX_PATH='~;~/jasper' -DCMAKE_INSTALL_PREFIX='~/nceplibs' -DFLAT=ON | |
make -j2 | |
- name: checkout-ufs-utils | |
uses: actions/checkout@v2 | |
with: | |
path: ufs_utils | |
submodules: recursive | |
- name: build | |
run: | | |
export ESMFMKFILE=~/esmf/lib/esmf.mk | |
cd ufs_utils | |
mkdir build && cd build | |
export CC=mpicc | |
export CXX=mpicxx | |
export FC=mpifort | |
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:~/jasper/lib;~/jasper/lib64" | |
cmake .. -DCMAKE_PREFIX_PATH='~/jasper;~/nceplibs' -DCMAKE_BUILD_TYPE=Debug -DENABLE_DOCS=On -DCMAKE_Fortran_FLAGS="-g -fprofile-arcs -ftest-coverage -O0" | |
make -j2 | |
- name: test | |
run: | | |
cd ufs_utils/build | |
export LSAN_OPTIONS=suppressions=LSanSuppress.supp | |
ctest --rerun-failed --output-on-failure | |
export PATH="/home/runner/.local/bin:$PATH" | |
gcovr -r .. --html-details -o test-coverage.html | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: test-coverage | |
path: ufs_utils/build/*.html |