Skip to content

Commit

Permalink
Github Action Improvements (#503)
Browse files Browse the repository at this point in the history
Add Intel build

Add NetCDF build to test different versions of NetCDF, currently only 4.8.0

Documentation and debug build for test coverage and memory leaks

Matrix build for macOS/Linux, OpenMPI/MPICH, NCEPLIBS develop/1.3.0
  • Loading branch information
kgerheiser authored May 7, 2021
1 parent dc842bf commit eff57d2
Show file tree
Hide file tree
Showing 6 changed files with 660 additions and 318 deletions.
113 changes: 113 additions & 0 deletions .github/workflows/debug-docs-test_coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
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.0.1-${{ runner.os }}

- name: build-esmf
if: steps.cache-esmf.outputs.cache-hit != 'true'
run: |
pushd ~
export ESMF_DIR=~/esmf-ESMF_8_0_1
wget https://github.com/esmf-org/esmf/archive/ESMF_8_0_1.tar.gz &> /dev/null
tar zxf ESMF_8_0_1.tar.gz
cd esmf-ESMF_8_0_1
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 }}

- 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
make -j2
make install
- name: cache-nceplibs
id: cache-nceplibs
uses: actions/cache@v2
with:
path: ~/nceplibs
key: nceplibs-1.3.0-${{ runner.os }}

- name: build-nceplibs
if: steps.cache-nceplibs.outputs.cache-hit != 'true'
run: |
wget https://github.com/NOAA-EMC/NCEPLIBS/archive/v1.3.0.tar.gz &> /dev/null
tar zxf v1.3.0.tar.gz
cd NCEPLIBS-1.3.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

- 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
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
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
155 changes: 0 additions & 155 deletions .github/workflows/esmf-8.0.1_jasper-2.0.22_nceplibs-1.3.0.yml

This file was deleted.

Loading

0 comments on commit eff57d2

Please sign in to comment.