Skip to content

Develop - Nightly

Develop - Nightly #262

name: Develop - Nightly
on:
schedule:
- cron: '30 7 * * *'
workflow_dispatch:
jobs:
nuopc-test:
name: ${{matrix.config.name}}
runs-on: ${{matrix.config.os}}
strategy:
matrix:
config:
- {
name: "Ubuntu (gfortran, openmpi)",
os: ubuntu-latest,
compiler: gfortran,
comm: openmpi
}
steps:
- uses: actions/checkout@v4
- name: Library Directory
run: |
export STACK_ROOT=${HOME}/stack
mkdir -p ${STACK_ROOT}/{include,lib,lib64,bin}
echo "STACK_ROOT=${STACK_ROOT}" >> $GITHUB_ENV
export LD_LIBRARY_PATH=${STACK_ROOT}/lib64:${STACK_ROOT}/lib:${LD_LIBRARY_PATH}
echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}" >> $GITHUB_ENV
echo "CPPFLAGS=-I${STACK_ROOT}/include" >> $GITHUB_ENV
echo "LDFLAGS=-L${STACK_ROOT}/lib" >> $GITHUB_ENV
echo "${STACK_ROOT}/bin" >> $GITHUB_PATH
- name: Cache Libraries
id: cache-libraries
uses: actions/cache@v4
with:
path: ${{env.STACK_ROOT}}
key: develop-nightly-${{matrix.config.os}}-${{matrix.config.compiler}}-${{matrix.config.comm}}
- name: Install OPENMPI
if: ${{matrix.config.comm}} == 'openmpi'
env:
CACHE_HIT: ${{steps.cache-libraries.outputs.cache-hit}}
run: |
if [[ "$CACHE_HIT" != 'true' ]]; then
OPENMPI_URL="https://download.open-mpi.org/release/open-mpi/v4.0/openmpi-4.0.3.tar.gz"
mkdir ${{runner.temp}}/openmpi
cd ${{runner.temp}}/openmpi
curl -L $OPENMPI_URL | tar --strip-components=1 -xz
./configure --prefix=${{env.STACK_ROOT}}
make -j 2 install
fi
echo "CC=${{env.STACK_ROOT}}/bin/mpicc" >> $GITHUB_ENV
echo "CXX=${{env.STACK_ROOT}}/bin/mpicxx" >> $GITHUB_ENV
echo "F77=${{env.STACK_ROOT}}/bin/mpif77" >> $GITHUB_ENV
echo "F90=${{env.STACK_ROOT}}/bin/mpif90" >> $GITHUB_ENV
echo "FC=${{env.STACK_ROOT}}/bin/mpifort" >> $GITHUB_ENV
echo "OPENMPI_ROOT=${{env.STACK_ROOT}}" >> $GITHUB_ENV
- name: Install HDF5
env:
CACHE_HIT: ${{steps.cache-libraries.outputs.cache-hit}}
run: |
if [[ "$CACHE_HIT" != 'true' ]]; then
HDF5_URL="https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.12/hdf5-1.12.2/src/hdf5-1.12.2.tar.gz"
mkdir ${{runner.temp}}/hdf5
cd ${{runner.temp}}/hdf5
curl -L $HDF5_URL | tar --strip-components=2 -xz
./configure --enable-fortran --prefix=${{env.STACK_ROOT}}
make -j 2 install
fi
echo "HDF5_ROOT=${{env.STACK_ROOT}}" >> $GITHUB_ENV
- name: Install NetCDF-C
env:
CACHE_HIT: ${{steps.cache-libraries.outputs.cache-hit}}
run: |
if [[ "$CACHE_HIT" != 'true' ]]; then
NETCDF_URL="https://github.com/Unidata/netcdf-c/archive/v4.9.0.tar.gz"
mkdir ${{runner.temp}}/netcdf-c
cd ${{runner.temp}}/netcdf-c
curl -L $NETCDF_URL | tar --strip-components=1 -xz
./configure --enable-netcdf-4 --disable-dap --prefix=${{env.STACK_ROOT}}
make -j 2 install
fi
echo "NETCDF_ROOT=${{env.STACK_ROOT}}" >> $GITHUB_ENV
- name: Install NetCDF-Fortran
env:
CACHE_HIT: ${{steps.cache-libraries.outputs.cache-hit}}
run: |
if [[ "$CACHE_HIT" != 'true' ]]; then
NETCDFF_URL="https://github.com/Unidata/netcdf-fortran/archive/v4.5.4.tar.gz"
mkdir ${{runner.temp}}/netcdf-fortran
cd ${{runner.temp}}/netcdf-fortran
curl -L $NETCDFF_URL | tar --strip-components=1 -xz
./configure --prefix=${{env.STACK_ROOT}}
make -j 2 install
fi
echo "NETCDFF_ROOT=${{env.STACK_ROOT}}" >> $GITHUB_ENV
- name: Install ESMF
uses: esmf-org/install-esmf-action@v1
env:
ESMF_COMPILER: ${{matrix.config.compiler}}
ESMF_COMM: ${{matrix.config.comm}}
ESMF_NETCDF: 'nc-config'
with:
build-key: 'develop-nightly-${{matrix.config.os}}-${{matrix.config.compiler}}-${{matrix.config.comm}}'
version: 'develop'
rebuild-check: quick
esmpy: false
cache: true
- name: NUOPC Tests
run: |
export TOOLRUN="--oversubscribe"
./testProtos.sh