Skip to content

update esmf bld to use official esmf action #652

update esmf bld to use official esmf action

update esmf bld to use official esmf action #652

Workflow file for this run

# This is a workflow to compile the cdeps source without cime
name: extbuild
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the main branch
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build-cdeps:
runs-on: ubuntu-latest
env:
CC: mpicc
FC: mpifort
CXX: mpicxx
CPPFLAGS: "-I/usr/include -I/usr/local/include "
LDFLAGS: "-L/usr/lib/x86_64-linux-gnu "
# Versions of all dependencies can be updated here - these match tag names in the github repo
ESMF_VERSION: v8.4.0
#PNETCDF_VERSION: checkpoint.1.12.3
#NETCDF_FORTRAN_VERSION: v4.6.0
ParallelIO_VERSION: pio2_5_10
steps:
- id: checkout-CDEPS
uses: actions/checkout@v3
with:
submodules: recursive
- id: load-env
run: |
sudo apt-get update
sudo apt-get install gfortran
sudo apt-get install wget
sudo apt-get install openmpi-bin libopenmpi-dev
sudo apt-get install netcdf-bin libnetcdf-dev libnetcdff-dev
sudo apt-get install pnetcdf-bin libpnetcdf-dev
sudo apt-get install autotools-dev autoconf
# - id: cache-pnetcdf
# uses: actions/cache@v3
# with:
# path: ~/pnetcdf
# key: ${{ runner.os }}-${{ env.PNETCDF_VERSION}}-pnetcdf1
# - name: Build PNetCDF
# if: steps.cache-pnetcdf.outputs.cache-hit != 'true'
# uses: ./.github/actions/buildpnetcdf
# with:
# pnetcdf_version: ${{ env.PNETCDF_VERSION }}
# install_prefix: $HOME/pnetcdf
# - name: Cache netcdf-fortran
# id: cache-netcdf-fortran
# uses: actions/cache@v3
# with:
# path: ~/netcdf-fortran
# key: ${{ runner.os }}-${{ env.NETCDF_FORTRAN_VERSION }}-netcdf-fortran1
# - name: Build NetCDF Fortran
# if: steps.cache-netcdf-fortran.outputs.cache-hit != 'true'
# uses: ./.github/actions/buildnetcdff
# with:
# netcdf_fortran_version: ${{ env.NETCDF_FORTRAN_VERSION }}
# install_prefix: $HOME/netcdf-fortran
# netcdf_c_path: /usr
- name: Cache PARALLELIO
id: cache-PARALLELIO
uses: actions/cache@v3
with:
path: ~/pio
key: ${{ runner.os }}-${{ env.ParallelIO_VERSION }}-parallelio2
- name: Build ParallelIO
if: steps.cache-PARALLELIO.outputs.cache-hit != 'true'
uses: NCAR/ParallelIO/.github/actions/parallelio_cmake@9390e30e29d4ebbfbef0fc72162cacd9e8f25e4e
with:
parallelio_version: ${{ env.ParallelIO_VERSION }}
enable_fortran: True
install_prefix: $HOME/pio
- name: Cache ESMF
id: cache-esmf
uses: actions/cache@v3
with:
path: ~/ESMF
key: ${{ runner.os }}-${{ env.ESMF_VERSION }}-ESMF2
# - name: Build ESMF
# if: steps.cache-esmf.outputs.cache-hit != 'true'
# uses: ./.github/actions/buildesmf
# with:
# esmf_version: ${{ env.ESMF_VERSION }}
# esmf_bopt: g
# esmf_comm: openmpi
# install_prefix: $HOME/ESMF
# netcdf_c_path: /usr
# netcdf_fortran_path: /usr
# pnetcdf_path: /usr
# parallelio_path: $HOME/pio
- name: Install ESMF
uses: esmf-org/install-esmf-action@v1
env:
ESMF_COMPILER: gfortran
ESMF_BOPT: g
ESMF_COMM: openmpi
ESMF_NETCDF: nc-config
ESMF_INSTALL_PREFIX: $HOME/ESMF
with:
version: ${{ env.ESMF_VERSION }}

Check failure on line 104 in .github/workflows/extbuild.yml

View workflow run for this annotation

GitHub Actions / extbuild

Invalid workflow file

The workflow is not valid. .github/workflows/extbuild.yml (Line: 104, Col: 13): A mapping was not expected
esmpy: false
cache: false
- name: Build CDEPS
uses: ./.github/actions/buildcdeps
with:
esmfmkfile: $HOME/ESMF/lib/libg/Linux.gfortran.64.openmpi.default/esmf.mk
pio_path: $HOME/pio
src_root: $GITHUB_WORKSPACE
cmake_flags: " -Wno-dev -DCMAKE_BUILD_TYPE=DEBUG -DWERROR=ON -DCMAKE_Fortran_FLAGS=\"-DCPRGNU -g -Wall \
-ffree-form -ffree-line-length-none -fallow-argument-mismatch \""
- name: Test CDEPS
run: |
cd build-cdeps
make VERBOSE=1