dropme #1031
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Continuous integration in a box | |
on: | |
push: | |
branches-ignore: | |
- documentation | |
pull_request: | |
branches-ignore: | |
- documentation | |
jobs: | |
Containerized-CI: | |
runs-on: ubuntu-22.04 | |
continue-on-error: ${{ matrix.experimental }} | |
strategy: | |
fail-fast: false | |
matrix: | |
fortran-compiler: [ifort, ifx, nvfortran] | |
rte-kernels: [default, openacc] | |
offload: [true, false] | |
exclude: | |
- rte-kernels: default | |
offload: true | |
- fortran-compiler: ifort | |
offload: true | |
include: | |
# The tests are not experimental by default: | |
- experimental: false | |
# Disable GPU support to use the default kernels: | |
- rte-kernels: default | |
enable-gpu: no | |
# Enable GPU support with OpenMP by default: | |
- rte-kernels: openacc | |
enable-gpu: openmp | |
# Enable GPU support with OpenACC for NVIDIA Fortran Compiler: | |
- fortran-compiler: nvfortran | |
rte-kernels: openacc | |
enable-gpu: openacc | |
# Set flags for Intel Fortran Compiler Classic: | |
- fortran-compiler: ifort | |
fcflags: "-m64 -g -traceback -heap-arrays -assume realloc_lhs -extend-source 132 -check bounds,uninit,pointers,stack -stand f08" | |
# Set flags for Intel Fortran Compiler: | |
- fortran-compiler: ifx | |
offload: false | |
fcflags: "-debug -traceback -heap-arrays -assume realloc_lhs -extend-source 132 -stand f08" | |
- fortran-compiler: ifx | |
offload: true | |
fcflags: "-debug -traceback -heap-arrays -assume realloc_lhs -extend-source 132 -stand f08 -fopenmp-target=spir64" | |
experimental: true | |
# Set flags for NVIDIA Fortran Compiler: | |
- fortran-compiler: nvfortran | |
fcflags: "-Mallocatable=03 -Mstandard -Mbounds -Mchkptr -Kieee -Mchkstk" | |
# Set container images: | |
- fortran-compiler: ifort | |
image: "ghcr.io/earth-system-radiation/rte-rrtmgp-ci:ifort" | |
- fortran-compiler: ifx | |
image: "ghcr.io/earth-system-radiation/rte-rrtmgp-ci:ifort" | |
- fortran-compiler: nvfortran | |
image: "ghcr.io/earth-system-radiation/rte-rrtmgp-ci:nvfortran" | |
container: | |
image: ${{ matrix.image }} | |
env: | |
# Core variables: | |
FC: ${{ matrix.fortran-compiler }} | |
FCFLAGS: ${{ matrix.fcflags }} | |
# Configure script variables: | |
LAUNCH_PREFIX: | |
# Auxiliary variables: | |
NFHOME: /opt/netcdf-fortran | |
RFMIP_CACHEDIR: .testcache | |
steps: | |
# | |
# Checks-out repository under $GITHUB_WORKSPACE | |
# | |
- uses: actions/checkout@v3 | |
# | |
# Cache RFMIP files | |
# | |
- name: Cache RFMIP files | |
uses: actions/cache@v3 | |
with: | |
path: ${{ env.RFMIP_CACHEDIR }} | |
key: rfmip-files-autoconf | |
# | |
# Configure | |
# | |
- name: Configure | |
run: | | |
test 'x${{ matrix.rte-kernels }}' = xopenacc && \ | |
test 'x${{ matrix.offload }}' = xfalse && \ | |
suppress_gpu_flag='acx_cv_fc_${{ matrix.enable-gpu }}_flag=' || \ | |
suppress_gpu_flag= | |
./configure \ | |
--disable-examples \ | |
--disable-silent-rules \ | |
--enable-gpu='${{ matrix.enable-gpu }}' \ | |
--enable-tests \ | |
--with-netcdf-fortran="${NFHOME}" \ | |
$suppress_gpu_flag \ | |
|| { cat ./config.log; exit 1; } | |
# | |
# Build | |
# | |
- name: Build | |
run: make -j | |
# | |
# Check | |
# | |
- name: Check | |
run: | | |
make -j check | |
find . -name '*.test.log' -print -exec cat {} ';' | |
# | |
# Generate validation plots | |
# | |
- name: Generate validation plots | |
if: matrix.fortran-compiler == 'ifort' && matrix.rte-kernels == 'default' | |
working-directory: tests | |
run: python validation-plots.py | |
# | |
# Upload validation plots | |
# | |
- name: Upload validation plots | |
if: matrix.fortran-compiler == 'ifort' && matrix.rte-kernels == 'default' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: valdiation-plot | |
path: tests/validation-figures.pdf |