-
Notifications
You must be signed in to change notification settings - Fork 69
113 lines (111 loc) · 3.88 KB
/
containerized-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
name: Continuous integration in a box
on:
push:
branches:
- main
- develop
pull_request:
branches-ignore:
- documentation
workflow_dispatch:
jobs:
Containerized-CI:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
fortran-compiler: [ifort, ifx, nvfortran]
rte-kernels: [default, accel]
fpmodel: [DP, SP]
include:
# Set flags for Intel Fortran Compiler Classic
- fortran-compiler: ifort
fcflags: -m64 -traceback -heap-arrays -assume realloc_lhs -extend-source 132 -check bounds,uninit,pointers,stack -stand f08 -diag-disable=10448
build-type: RelWithDebInfo
# Set flags for Intel Fortran Compiler
- fortran-compiler: ifx
rte-kernels: default
fcflags: -debug -traceback -O0 -heap-arrays -assume realloc_lhs -extend-source 132 -stand f08
build-type: None
- fortran-compiler: ifx
rte-kernels: accel
fcflags: -debug -traceback -O0 -heap-arrays -assume realloc_lhs -extend-source 132 -stand f08 -fiopenmp -fopenmp-targets=spir64
build-type: None
# Set flags for NVIDIA Fortran compiler
- fortran-compiler: nvfortran
rte-kernels: default
fcflags: -Mallocatable=03 -Mstandard -Mbounds -Mchkptr -Kieee -Mchkstk
build-type: None
- fortran-compiler: nvfortran
rte-kernels: accel
fcflags: -Mallocatable=03 -Mstandard -Mbounds -Mchkptr -Kieee -Mchkstk -acc
build-type: None
# Set container images
- fortran-compiler: ifort
image: ghcr.io/earth-system-radiation/rte-rrtmgp-ci:oneapi
- fortran-compiler: ifx
image: ghcr.io/earth-system-radiation/rte-rrtmgp-ci:oneapi
- fortran-compiler: nvfortran
image: ghcr.io/earth-system-radiation/rte-rrtmgp-ci:nvhpc
container:
image: ${{ matrix.image }}
env:
FC: ${{ matrix.fortran-compiler }}
FFLAGS: ${{ matrix.fcflags }}
NetCDF_Fortran_ROOT: /opt/netcdf-fortran
CMAKE_BUILD_PARALLEL_LEVEL: 8
VERBOSE:
# TODO: add missing test dependencies and run them in parallel:
# CTEST_PARALLEL_LEVEL: 8
CTEST_OUTPUT_ON_FAILURE: 1
# https://github.com/earth-system-radiation/rte-rrtmgp/issues/194
OMP_TARGET_OFFLOAD: DISABLED
steps:
#
# Check out repository under $GITHUB_WORKSPACE
#
- name: Check out code
uses: actions/checkout@v4
#
# Install required tools
#
- name: Install Required Tools
run: |
apt-get update
apt-get install -y git cmake ninja-build
#
# Build libraries, examples and tests (expect success)
#
- name: Build libraries, examples and tests (expect success)
id: build-success
if: matrix.fortran-compiler != 'ifx' || matrix.rte-kernels != 'accel'
run: |
cmake -S . -B build -G "Ninja" \
-DCMAKE_BUILD_TYPE=${{ matrix.build-type }} \
-DRTE_ENABLE_SP=`test 'x${{ matrix.fpmodel }}' = xSP && echo ON || echo OFF` \
-DKERNEL_MODE=${{ matrix.rte-kernels }} \
-DBUILD_TESTING=ON
cmake --build build
#
# Run examples and tests
#
- name: Run examples and tests
working-directory: build
if: steps.build-success.outcome != 'skipped'
run: ctest
#
# Generate validation plots
#
- name: Generate validation plots
if: matrix.fortran-compiler == 'ifort' && matrix.rte-kernels == 'default' && matrix.fpmodel == 'DP'
run: |
cmake --build build --target validation-plots
#
# Upload validation plots
#
- name: Upload validation plots
if: matrix.fortran-compiler == 'ifort' && matrix.rte-kernels == 'default' && matrix.fpmodel == 'DP'
uses: actions/upload-artifact@v4
with:
name: valdiation-plot
path: build/tests/validation-figures.pdf