-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #48 from jedwards4b/update_cmake_build
Update cmake build
- Loading branch information
Showing
65 changed files
with
572 additions
and
18,988 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: SHARE build and cache | ||
description: 'Build the SHARE library' | ||
inputs: | ||
share_version: | ||
description: 'Tag in the SHARE 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 share 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 share' | ||
default: $HOME/share | ||
required: False | ||
type: string | ||
runs: | ||
using: composite | ||
steps: | ||
- id : Build-SHARE | ||
shell: bash | ||
run: | | ||
mkdir build-share | ||
pushd build-share | ||
export ESMFMKFILE=${{ inputs.esmfmkfile }} | ||
export PIO_ROOT=${{ inputs.pio_path }} | ||
cmake ${{ inputs.cmake_flags }} ${{ inputs.src_root }} | ||
make VERBOSE=1 | ||
popd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
# This is a workflow to compile the share 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-share: | ||
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.6.1 | ||
ParallelIO_VERSION: pio2_6_2 | ||
steps: | ||
- id: checkout-share | ||
uses: actions/checkout@v4 | ||
- 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 | ||
- name: Cache PARALLELIO | ||
id: cache-PARALLELIO | ||
uses: actions/cache@v4 | ||
with: | ||
path: ${GITHUB_WORKSPACE}/pio | ||
key: ${{ runner.os }}-${{ env.ParallelIO_VERSION }}-pio | ||
- 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: ${GITHUB_WORKSPACE}/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_PNETCDF: pnetcdf-config | ||
ESMF_INSTALL_PREFIX: ${GITHUB_WORKSPACE}/ESMF | ||
ESMF_PIO: external | ||
ESMF_PIO_INCLUDE: ${GITHUB_WORKSPACE}/pio/include | ||
ESMF_PIO_LIBPATH: ${GITHUB_WORKSPACE}/pio/lib | ||
with: | ||
version: ${{ env.ESMF_VERSION }} | ||
esmpy: false | ||
cache: true | ||
|
||
- name: Build SHARE | ||
uses: ./.github/actions/buildshare | ||
with: | ||
esmfmkfile: $ESMFMKFILE | ||
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 \ | ||
-ffree-form -ffree-line-length-none -fallow-argument-mismatch\" \ | ||
-DCMAKE_MODULE_PATH=$ESMF_ROOT/cmake" | ||
- name: Test CDEPS | ||
run: | | ||
cd build-share | ||
make VERBOSE=1 |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.