From 1fc8f9ef8201dcce85ccc388e5cd31bf3d7c1f2d Mon Sep 17 00:00:00 2001 From: zmoon Date: Wed, 29 May 2024 16:14:30 -0600 Subject: [PATCH] Local comm var; elif --- .github/workflows/build.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f9fc729..669df67 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,13 +7,13 @@ jobs: build: name: Build ESMF ${{ matrix.esmf_version }} with GCC ${{ matrix.gcc_major_version }} - (${{ matrix.comm }}) + (${{ matrix.esmf_comm }}) runs-on: ubuntu-22.04 strategy: matrix: gcc_major_version: ["12"] esmf_version: ["8.3.1", "8.4.2", "8.5.0", "8.6.1"] - comm: ["mpiuni", "mpi"] + esmf_comm: ["mpiuni", "mpi"] steps: - name: Check out @@ -26,10 +26,11 @@ jobs: - name: Build ESMF run: | v="${{ matrix.esmf_version }}" # ESMF + comm="${{ matrix.esmf_comm }}" gcc="${{ matrix.gcc_major_version }}" esmf_base=$HOME/esmf - export ESMF_DIR=${esmf_base}/${v}-gcc-${gcc}-${{ matrix.comm }} + export ESMF_DIR=${esmf_base}/${v}-gcc-${gcc}-${comm} mkdir -p $ESMF_DIR cd $esmf_base wget https://github.com/esmf-org/esmf/archive/refs/tags/v${v}.tar.gz @@ -37,14 +38,14 @@ jobs: export ESMF_COMPILER=gfortran export ESMF_LAPACK=netlib - export ESMF_COMM=${{ matrix.comm }} + export ESMF_COMM=${comm} export ESMF_PIO=internal export ESMF_NETCDF=nc-config - if [ "${{ matrix.comm }}" == "mpiuni" ]; then + if [ "${comm}" == "mpiuni" ]; then export ESMF_F90COMPILER=gfortran-${gcc} export ESMF_CCOMPILER=gcc-${gcc} export ESMF_CXXCOMPILER=g++-${gcc} - else if [ "${{ matrix.comm }}" == "mpi" ]; then + elif [ "${comm}" == "mpi" ]; then export OMPI_FC=gfortran-${gcc} export OMPI_CC=gcc-${gcc} export OMPI_CXX=g++-${gcc} @@ -59,7 +60,7 @@ jobs: cd $ESMF_DIR make -j lib - echo "ESMFMKFILE=${ESMF_DIR}/lib/libO/Linux.gfortran.64.${{ matrix.comm }}.default/esmf.mk" >> "$GITHUB_ENV" + echo "ESMFMKFILE=${ESMF_DIR}/lib/libO/Linux.gfortran.64.${comm}.default/esmf.mk" >> "$GITHUB_ENV" echo "ESMF_DIR=${ESMF_DIR}" >> "$GITHUB_ENV" - name: Compress ESMF dir @@ -71,7 +72,7 @@ jobs: - name: Upload ESMF dir as artifact uses: actions/upload-artifact@v4 with: - name: esmf-${{ matrix.esmf_version }}-gcc-${{ matrix.gcc_major_version }}-${{ matrix.comm }} + name: esmf-${{ matrix.esmf_version }}-gcc-${{ matrix.gcc_major_version }}-${{ matrix.esmf_comm }} path: ${{ env.ESMF_DIR }}.tar.gz retention-days: 1