Skip to content

Commit

Permalink
Merge pull request #53 from zmoon/ci-build
Browse files Browse the repository at this point in the history
Build NEXUS in CI
  • Loading branch information
zmoon authored Jun 17, 2024
2 parents 888a46d + 8a225e2 commit 969db2f
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 1 deletion.
43 changes: 43 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: CI

on:
push:
branches: [develop]
pull_request:
workflow_dispatch:

jobs:
build:
name: Build (APT, no MPI, pre-built ESMF)
runs-on: ubuntu-22.04
steps:
- name: Check out
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0

- name: Install dependencies
run: sudo apt-get install -y libnetcdf-dev libnetcdff-dev
liblapack-dev libopenblas-dev

- name: Fetch pre-built ESMF
run: |
v="8.3.1" # ESMF
gcc="12"
esmf_base=$HOME/esmf
esmf=${v}-gcc-${gcc}-mpiuni
export ESMF_DIR=${esmf_base}/${esmf}
mkdir -p $ESMF_DIR
cd $ESMF_DIR
wget https://github.com/zmoon/gha-esmf/releases/download/v0.0.5/${esmf}.tar.gz
tar xzvf ${esmf}.tar.gz
echo "ESMFMKFILE=${ESMF_DIR}/lib/libO/Linux.gfortran.64.mpiuni.default/esmf.mk" >> "$GITHUB_ENV"
- name: Configure
run: FC=gfortran-12 cmake -S . -B build

- name: Build
run: cmake --build build
1 change: 0 additions & 1 deletion src/nuopc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ target_include_directories(NEXUS_Shared
INTERFACE ${HEMCO_BINARY_DIR}/mod
)

find_package(MPI REQUIRED)
find_package(ESMF REQUIRED)
find_package(NetCDF REQUIRED COMPONENTS Fortran)

Expand Down

0 comments on commit 969db2f

Please sign in to comment.