Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/actions/buildcdeps/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ inputs:
default: $HOME/ESMF/lib/libg/Linux.gfortran.64.openmpi.default/esmf.mk
required: False
type: string
esmf_root:
description: 'Path to the installed ESMF library'
default: $HOME/ESMF
required: False
type: string
src_root:
description: 'Path to cdeps source'
default: $GITHUB_WORKSPACE
Expand All @@ -40,7 +45,13 @@ runs:
mkdir build-cdeps
pushd build-cdeps
export ESMFMKFILE=${{ inputs.esmfmkfile }}
export ESMF_ROOT=${{ inputs.esmf_root }}
export PIO=${{ inputs.pio_path }}
echo "ESMFMKFILE=${ESMFMKFILE}"
echo "ESMF_ROOT=${ESMF_ROOT}"
ls -l ${ESMFMKFILE}
ls -l ${ESMF_ROOT}
ls -lR ${ESMF_ROOT}/lib
cmake ${{ inputs.cmake_flags }} ${{ inputs.src_root }}
make VERBOSE=1
popd
14 changes: 8 additions & 6 deletions .github/workflows/extbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
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 ]
on: push
# 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:
Expand All @@ -19,7 +20,7 @@ jobs:
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.6.1
ESMF_VERSION: v8.8.0
ParallelIO_VERSION: pio2_6_2
steps:
- id: checkout-CDEPS
Expand Down Expand Up @@ -69,6 +70,7 @@ jobs:
uses: ./.github/actions/buildcdeps
with:
esmfmkfile: $ESMFMKFILE
esmf_root: ${GITHUB_WORKSPACE}/ESMF
pio_path: ${GITHUB_WORKSPACE}/pio
src_root: ${GITHUB_WORKSPACE}
cmake_flags: " -Wno-dev -DCMAKE_BUILD_TYPE=DEBUG -DWERROR=ON -DCMAKE_Fortran_FLAGS=\"-DCPRGNU -g -Wall \
Expand Down
6 changes: 4 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,11 @@ endif()
message("CMAKE_MODULE_PATH is ${CMAKE_MODULE_PATH}, CMAKE_Fortran_COMPILER is ${CMAKE_Fortran_COMPILER}")
enable_language(Fortran)

if (TARGET esmf)
message("Target esmf is already found. Skip find_package ...")
if (TARGET ESMF::ESMF)
message("Target ESMF::ESMF is already found. Skip find_package ...")
else()
list(APPEND CMAKE_MODULE_PATH $ENV{ESMF_ROOT}/cmake)
message("CMAKE_MODULE_PATH is ${CMAKE_MODULE_PATH}, before find_package ESMF")
find_package(ESMF REQUIRED)
endif()

Expand Down
47 changes: 0 additions & 47 deletions cmake/FindESMF.cmake

This file was deleted.