Skip to content

Update action/cache to v4 #92

Update action/cache to v4

Update action/cache to v4 #92

Workflow file for this run

name: Tests
on:
pull_request:
branches:
- main
- releases/**
push:
branches:
- main
- releases/**
workflow_dispatch:
jobs:
acceptance-test:
name: ${{matrix.config.name}}
runs-on: ${{matrix.config.os}}
strategy:
matrix:
config:
- {
name: "Ubuntu (latest, cache, netcdf, esmx, esmpy)",
os: ubuntu-latest,
version: latest,
compiler: gfortran,
comm: mpiuni,
esmx: true,
esmpy: true,
cache: true,
prefix: "",
netcdf: nc-config
}
- {
name: "Ubuntu (develop, no-cache, prefix)",
os: ubuntu-latest,
version: develop,
compiler: gfortran,
comm: mpiuni,
esmx: false,
esmpy: false,
prefix: "$HOME/stack",
cache: false
}
- {
name: "MacOS (v8.6.0, cache, netcdf)",
os: macos-latest,
version: v8.6.0,
compiler: gfortran,
comm: mpiuni,
esmx: false,
esmpy: false,
cache: true,
prefix: "",
netcdf: nc-config
}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Package Install (Linux)
if: runner.os == 'Linux' && matrix.config.netcdf == 'nc-config'
run: |
sudo apt-get -qq -y update
sudo apt -qq install libnetcdf-dev libnetcdff-dev
- name: Package Install (macOS)
if: runner.os == 'macOS' && matrix.config.netcdf == 'nc-config'
run: |
ln -fs `which gcc-12` /usr/local/bin/gcc
ln -fs `which g++-12` /usr/local/bin/g++
ln -fs `which gfortran-12` /usr/local/bin/gfortran
brew install netcdf netcdf-fortran
- name: Setup Python
if: matrix.config.esmpy
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install ESMF
uses: ./
env:
ESMF_COMPILER: ${{matrix.config.compiler}}
ESMF_COMM: ${{matrix.config.comm}}
ESMF_INSTALL_PREFIX: ${{matrix.config.prefix}}
ESMF_NETCDF: ${{matrix.config.netcdf}}
with:
version: ${{matrix.config.version}}
esmpy: ${{matrix.config.esmpy}}
cache: ${{matrix.config.cache}}
- name: Print ESMF Info
run: |
cat ${ESMFMKFILE}
- name: Check ESMX
if: matrix.config.esmx
run: |
pip install pyyaml
cd __tests__
ESMX_Builder esmxBuild.yaml
if [[ "${{matrix.config.comm}}" == "mpiuni" ]]; then
./install/bin/esmx_app
else
mpirun -np 1 ./install/bin/esmx_app
fi
- name: Check esmpy
if: matrix.config.esmpy
run: python __tests__/esmpy_test.py