Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update github to make cdeps ext build an action #234

Merged
merged 5 commits into from
May 19, 2023
Merged
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
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