From 3bd60acdfb1819e5f3bb85659d73fa5f892034f4 Mon Sep 17 00:00:00 2001 From: zmoon Date: Thu, 2 May 2024 12:38:02 -0600 Subject: [PATCH 1/4] MPI not required for NEXUS itself ESMF has "mpiuni" build option for running without MPI --- src/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index d0a8854..3f2580d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -12,7 +12,6 @@ target_include_directories(NEXUS_Shared ) # find external libraries -find_package(MPI REQUIRED) find_package(ESMF REQUIRED) find_package(NetCDF REQUIRED COMPONENTS Fortran) From 8e2d20dff7b41aff1bd58e1bf07e1b51e50a29cc Mon Sep 17 00:00:00 2001 From: zmoon Date: Wed, 29 May 2024 16:28:59 -0600 Subject: [PATCH 2/4] Build NEXUS in CI using pre-built ESMF, which would otherwise add ~ 9 min to the CI run time --- .github/workflows/ci.yml | 42 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..eeebeaa --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,42 @@ +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 + + - 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 From 05dfd499aeff5d3e6641ee4d9c89c08390119b9f Mon Sep 17 00:00:00 2001 From: zmoon Date: Wed, 29 May 2024 16:37:18 -0600 Subject: [PATCH 3/4] Fetch depth 2 getting fatal: No tags can describe '4e818813da35bf76dbcee2da6ecc598b9c89b1a7'. (HEMCO hash) --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eeebeaa..51f0472 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,6 +15,7 @@ jobs: uses: actions/checkout@v4 with: submodules: true + fetch-depth: 2 - name: Install dependencies run: sudo apt-get install -y libnetcdf-dev libnetcdff-dev From 6ff9422dafb4af7776a71d5955210fe39f9b9bbd Mon Sep 17 00:00:00 2001 From: zmoon Date: Wed, 29 May 2024 16:41:07 -0600 Subject: [PATCH 4/4] Just get all history --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 51f0472..f08155a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: uses: actions/checkout@v4 with: submodules: true - fetch-depth: 2 + fetch-depth: 0 - name: Install dependencies run: sudo apt-get install -y libnetcdf-dev libnetcdff-dev