Skip to content

More versions

More versions #19

Workflow file for this run

on:
push:
pull_request:
workflow_dispatch:
jobs:
build:
name: Build ESMF ${{ matrix.esmf_version }} with GCC ${{ matrix.gcc_major_version }} (mpiuni)
runs-on: ubuntu-22.04
strategy:
matrix:
gcc_major_version: ["12", "13"]
esmf_version: ["8.3.1", "8.4.2", "8.5.0", "8.6.0"]
steps:
- name: Check out
uses: actions/checkout@v4
- name: Install dependencies
run: sudo apt-get install -y libnetcdf-dev libnetcdff-dev
liblapack-dev libopenblas-dev
- name: Build ESMF
run: |
v="${{ matrix.esmf_version }}" # ESMF
gcc="${{ matrix.gcc_major_version }}"
esmf_base=$HOME/esmf
export ESMF_DIR=${esmf_base}/${v}-gcc-${gcc}-mpiuni
mkdir -p $ESMF_DIR
cd $esmf_base
wget https://github.com/esmf-org/esmf/archive/refs/tags/v${v}.tar.gz
tar xzvf v${v}.tar.gz --directory=/tmp && mv /tmp/esmf-${v}/* $ESMF_DIR
export ESMF_COMPILER=gfortran
export ESMF_LAPACK=netlib
export ESMF_COMM=mpiuni
export ESMF_NETCDF=nc-config
export ESMF_F90COMPILER=gfortran-${gcc}
export ESMF_CCOMPILER=gcc-${gcc}
export ESMF_CXXCOMPILER=g++-${gcc}
export ESMF_F90LINKER=/usr/bin/ld
export ESMF_CLINKER=/usr/bin/ld
export ESMF_CXXLINKER=/usr/bin/ld
cd $ESMF_DIR
make -j lib
echo "ESMFMKFILE=${ESMF_DIR}/lib/libO/Linux.gfortran.64.mpiuni.default/esmf.mk" >> "$GITHUB_ENV"
echo "ESMF_DIR=${ESMF_DIR}" >> "$GITHUB_ENV"
- name: Compress ESMF dir
run: |
du -sh ${{ env.ESMF_DIR }}
tar czvf ${{ env.ESMF_DIR }}.tar.gz --directory=${{ env.ESMF_DIR }} .
du -sh ${{ env.ESMF_DIR }}.tar.gz
- name: Upload ESMF dir as artifact
uses: actions/upload-artifact@v4
with:
name: esmf-${{ matrix.esmf_version }}-gcc-${{ matrix.gcc_major_version }}-mpiuni
path: ${{ env.ESMF_DIR }}.tar.gz
retention-days: 1
release:
name: Release
runs-on: ubuntu-22.04
needs: build
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Download ESMF dir artifacts
uses: actions/download-artifact@v4
with:
name:
- name: List downloaded artifacts
run: ls -Al esmf-*
- name: Upload ESMFs to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./esmf-*/*.tar.gz
tag: ${{ github.ref }}
overwrite: true
file_glob: true