Skip to content

Commit

Permalink
Merge pull request #234 from jedwards4b/update_actions
Browse files Browse the repository at this point in the history
update github to make cdeps ext build an action
  • Loading branch information
jedwards4b authored May 19, 2023
2 parents aa77161 + 4a1f889 commit d7c8f92
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 7 deletions.
46 changes: 46 additions & 0 deletions .github/actions/buildcdeps/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: CDEPS build and cache
description: 'Build the CDEPS library'
inputs:
cdeps_version:
description: 'Tag in the CDEPS repository to use'
default: main
required: False
type: string
pio_path:
description: 'Path to the installed parallelio code root'
default: $HOME/pio
required: False
type: string
esmfmkfile:
description: 'Path to the installed ESMF library mkfile'
default: $HOME/ESMF/lib/libg/Linux.gfortran.64.openmpi.default/esmf.mk
required: False
type: string
src_root:
description: 'Path to cdeps source'
default: $GITHUB_WORKSPACE
required: False
type: string
cmake_flags:
description: 'Extra flags for cmake command'
default: -Wno-dev
required: False
type: string
install_prefix:
description: 'Install path of cdeps'
default: $HOME/cdeps
required: False
type: string
runs:
using: composite
steps:
- id : Build-CDEPS
shell: bash
run: |
mkdir build-cdeps
pushd build-cdeps
export ESMFMKFILE=${{ inputs.esmfmkfile }}
export PIO=${{ inputs.pio_path }}
cmake ${{ inputs.cmake_flags }} ${{ inputs.src_root }}
make VERBOSE=1
popd
16 changes: 9 additions & 7 deletions .github/workflows/extbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,14 @@ jobs:
pnetcdf_path: /usr
parallelio_path: $HOME/pio
- 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: |
export ESMFMKFILE=$HOME/ESMF/lib/libg/Linux.gfortran.64.openmpi.default/esmf.mk
export PIO=$HOME/pio
export SRC_ROOT=
mkdir build-cdeps
pushd build-cdeps
cmake -Wno-dev -DCMAKE_BUILD_TYPE=DEBUG -DCMAKE_Fortran_FLAGS="-DCPRGNU -g -Wall -ffree-form -ffree-line-length-none -fallow-argument-mismatch " -DWERROR=ON ../
cd build-cdeps
make VERBOSE=1
popd

0 comments on commit d7c8f92

Please sign in to comment.