Skip to content

Draft CI workflow

Draft CI workflow #1

Workflow file for this run

name: Test suite
on:
# Trigger the CI whenever a commit is pushed to main or develop, i.e., a PR is merged
push:
branches: [main, develop]
# Trigger the CI whenever a commit is pushed to an open PR
pull_request:
branches: [main, develop]
job:
# Test that GISS-GC can be compiled without error
compile:
runs-on: ubuntu-22.04
container:
image: ghcr.io/fetch4/giss-gc-dev-env:latest
steps:
- uses: actions/checkout@v2
- name: Build GISS-GC with GISS_GC_14 rundeck
run: |
. /opt/spack-environment/activate.sh
# GISS-GC environment variables
export GISS_HOME=/GISS-GC
export RUNID=GISS_GC_14
export ModelE_Support=/run
mkdir -p ${ModelE_Support}
# export ROOT=/data/ExtData/HEMCO # TODO: Do we need to download the inputs?
# Environment variables for passing NetCDF-C paths to GEOS-Chem
export NETCDF_HOME=$(nc-config --prefix)
export GC_BIN=${NETCDF_HOME}/bin
export GC_INCLUDE=${NETCDF_HOME}/include
export GC_LIB=${NETCDF_HOME}/lib
# Environment variables for passing NetCDF-Fortran paths to GEOS-Chem
export NETCDF_F_HOME=$(nf-config --prefix)
export GC_F_BIN=${NETCDF_F_HOME}/bin
export GC_F_INCLUDE=${NETCDF_F_HOME}/include
export GC_F_LIB=${NETCDF_F_HOME}/lib
# Copy over rundeck
cp rundecks/ ${GISS_HOME}/decks
cd ${GISS_HOME}/decks
# Build the model
make -j setup RUN=${RUNID} F90=mpif90 GC=YES