Skip to content

Commit db58b38

Browse files
authored
Merge branch 'NOAA-GFDL:main' into main
2 parents f2efd6e + a08691b commit db58b38

385 files changed

Lines changed: 51552 additions & 33970 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/Dockerfile.gnu

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
#***********************************************************************
2+
#* GNU Lesser General Public License
3+
#*
4+
#* This file is part of the GFDL Flexible Modeling System (FMS).
5+
#*
6+
#* FMS is free software: you can redistribute it and/or modify it under
7+
#* the terms of the GNU Lesser General Public License as published by
8+
#* the Free Software Foundation, either version 3 of the License, or (at
9+
#* your option) any later version.
10+
#*
11+
#* FMS is distributed in the hope that it will be useful, but WITHOUT
12+
#* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13+
#* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14+
#* for more details.
15+
#*
16+
#* You should have received a copy of the GNU Lesser General Public
17+
#* License along with FMS. If not, see <http://www.gnu.org/licenses/>.
18+
#***********************************************************************
19+
# FMS CI image recipefile for GNU
20+
# Runs on centos stream (builder has same base from redhat registry)
21+
#
22+
# arguments to specify versions to build can be given to docker or changed here (--build-arg name=val)
23+
FROM spack/rockylinux9:latest as builder
24+
25+
ARG gcc_version=12.3.0
26+
ARG netcdfc_version=4.9.0
27+
ARG netcdff_version=4.6.0
28+
ARG libyaml_version=0.2.5
29+
ARG mpich_version=4.0.2
30+
31+
COPY spack.env /opt/deps/spack.env
32+
33+
# perl's download kept timing out
34+
RUN sed -i 's/connect_timeout: 10/connect_timeout: 600/' /opt/spack/etc/spack/defaults/config.yaml && \
35+
spack install gcc@${gcc_version} && \
36+
source /opt/spack/share/spack/setup-env.sh && \
37+
spack load gcc@${gcc_version} && \
38+
spack compiler find && \
39+
sed "s/COMPILER/gcc@$gcc_version/" /opt/deps/spack.env > spack.yaml && \
40+
sed -i "s/NETCDF_C_VERSION/$netcdfc_version/" spack.yaml && \
41+
sed -i "s/NETCDF_F_VERSION/$netcdff_version/" spack.yaml && \
42+
sed -i "s/LIBYAML_VERSION/$libyaml_version/" spack.yaml && \
43+
sed -i "s/MPI_LIB/mpich@$mpich_version/" spack.yaml && \
44+
spack env activate -d . && \
45+
spack -e . concretize -f > /opt/deps/deps.log && \
46+
spack install --fail-fast
47+
48+
# copy built software to base from first image
49+
FROM rockylinux:9
50+
51+
COPY --from=builder /opt/view/ /opt/view/
52+
COPY --from=builder /opt/deps/ /opt/deps/
53+
54+
# input files used with --enable-input-tests
55+
# need to be on the dev boxes if building
56+
COPY ./fms_test_input /home/unit_tests_input
57+
58+
RUN dnf install -y autoconf make automake m4 libtool pkg-config zip
59+
60+
ENV FC="mpifort"
61+
ENV CC="mpicc"
62+
ENV MPICH_FC="/opt/view/bin/gfortran"
63+
ENV MPICH_CC="/opt/view/bin/gcc"
64+
ENV FCFLAGS="-I/opt/view/include"
65+
ENV CFLAGS="-I/opt/view/include"
66+
ENV LDFLAGS="-L/opt/view/lib"
67+
ENV LD_LIBRARY_PATH="/opt/view/lib:/opt/view/lib64:/usr/local/lib:/usr/local/lib64"
68+
ENV PATH="/opt/view/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin"

.github/workflows/build_ubuntu_gnu.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.

.github/workflows/coupler.yml

Lines changed: 0 additions & 27 deletions
This file was deleted.
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# 'main' required ci, does a distcheck (builds, tests, check install)
2+
# image created off dockerfile in repo, compile/link flags are set there
3+
name: Build libFMS test with autotools
4+
5+
on: [push, pull_request]
6+
7+
# cancel running jobs if theres a newer push
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
strategy:
16+
matrix:
17+
conf-flag: [ --disable-openmp, --disable-setting-flags, --with-mpi=no, --disable-r8-defaults]
18+
input-flag: [--with-yaml, --enable-test-input=/home/unit_tests_input]
19+
exclude:
20+
- conf-flag: --with-mpi=no
21+
input-flag: --enable-test-input=/home/unit_tests_input
22+
container:
23+
image: noaagfdl/fms-ci-rocky-gnu:12.3.0
24+
env:
25+
TEST_VERBOSE: 1
26+
DISTCHECK_CONFIGURE_FLAGS: "${{ matrix.conf-flag }} ${{ matrix.input-flag }} ${{ matrix.io-flag }}"
27+
SKIP_TESTS: "test_yaml_parser.5" # temporary till fixes are in
28+
steps:
29+
- name: Checkout code
30+
uses: actions/checkout@v4
31+
- name: Prepare GNU autoconf for build
32+
run: autoreconf -if
33+
- name: Configure the build
34+
if: ${{ matrix.conf-flag != '--disable-setting-flags' }}
35+
run: ./configure ${DISTCHECK_CONFIGURE_FLAGS} || cat config.log
36+
- name: Configure the build with compiler flags
37+
if: ${{ matrix.conf-flag == '--disable-setting-flags' }}
38+
run: ./configure ${DISTCHECK_CONFIGURE_FLAGS} FCFLAGS="-fdefault-real-8 -fdefault-double-8 -fcray-pointer -ffree-line-length-none -I/usr/include $FCFLAGS" || cat config.log
39+
- name: Build the library
40+
run: make distcheck
41+
if: ${{ matrix.conf-flag != '--with-mpi=no' }}
42+
- name: Build the library (without test suite for serial build)
43+
run: make
44+
if: ${{ matrix.conf-flag == '--with-mpi=no' }}

.github/workflows/intel_pr.yml renamed to .github/workflows/github_autotools_intel.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,23 @@
11
on: pull_request
2+
3+
# cancel running jobs if theres a newer push
4+
concurrency:
5+
group: ${{ github.workflow }}-${{ github.ref }}
6+
cancel-in-progress: true
7+
28
jobs:
39
intel-autotools:
410
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
io-flag: ["--disable-deprecated-io", "--enable-deprecated-io"]
514
container:
6-
image: intel/oneapi-hpckit:2022.2-devel-ubuntu20.04
15+
image: intel/oneapi-hpckit:2023.1.0-devel-ubuntu20.04
716
env:
817
CC: mpiicc
918
FC: mpiifort
1019
CFLAGS: "-I/libs/include"
11-
FCFLAGS: "-I/libs/include -g -traceback"
20+
FCFLAGS: "-I/libs/include -g -traceback ${{ matrix.io-flag }}"
1221
LDFLAGS: "-L/libs/lib"
1322
TEST_VERBOSE: 1
1423
I_MPI_FABRICS: "shm" # needed for mpi in image
@@ -22,7 +31,7 @@ jobs:
2231
path: /libs
2332
key: ${{ runner.os }}-intel-libs
2433
- name: Install packages for building
25-
run: apt update && apt install -y autoconf libtool automake zlibc zlib1g-dev
34+
run: apt-get update && apt-get install -y autoconf libtool automake zlibc zlib1g-dev
2635
- if: steps.cache.outputs.cache-hit != 'true'
2736
name: Build netcdf
2837
run: |
@@ -44,10 +53,10 @@ jobs:
4453
./configure --prefix=/libs
4554
make -j install && cd
4655
- name: checkout
47-
uses: actions/checkout@v2
56+
uses: actions/checkout@v4
4857
- name: Configure
4958
run: autoreconf -if ./configure.ac && ./configure --with-yaml
5059
- name: Compile
5160
run: make -j || make
5261
- name: Run test suite
53-
run: make check LD_LIBRARY_PATH="/libs/lib:$LD_LIBRARY_PATH" SKIP_TESTS="$SKIP_TESTS" VERBOSE=1
62+
run: make check LD_LIBRARY_PATH="/libs/lib:$LD_LIBRARY_PATH" TEST_VERBOSE=1
Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,26 @@ name: Build libFMS with cmake
22

33
on: [push, pull_request]
44

5+
# cancel running jobs if theres a newer push
6+
concurrency:
7+
group: ${{ github.workflow }}-${{ github.ref }}
8+
cancel-in-progress: true
9+
510
jobs:
611
build:
712
runs-on: ubuntu-latest
813
strategy:
914
matrix:
1015
omp-flags: [ -DOPENMP=on, -DOPENMP=off ]
1116
libyaml-flag: [ "", -DWITH_YAML=on ]
17+
io-flag: [ "", -DUSE_DEPRECATED_IO=on ]
1218
container:
1319
image: noaagfdl/hpc-me.ubuntu-minimal:cmake
1420
env:
15-
CMAKE_FLAGS: "${{ matrix.omp-flags }} ${{ matrix.libyaml-flag }} -D64BIT=on"
21+
CMAKE_FLAGS: "${{ matrix.omp-flags }} ${{ matrix.io-flag }} ${{ matrix.libyaml-flag }} -D64BIT=on"
1622
steps:
1723
- name: Checkout code
18-
uses: actions/checkout@v2
24+
uses: actions/checkout@v4
1925
- name: Generate makefiles with CMake
2026
run: cmake $CMAKE_FLAGS .
2127
- name: Build the library
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Test coupler build
2+
on: [pull_request]
3+
4+
# cancel running jobs if theres a newer push
5+
concurrency:
6+
group: ${{ github.workflow }}-${{ github.ref }}
7+
cancel-in-progress: true
8+
9+
jobs:
10+
coupler-build:
11+
runs-on: ubuntu-latest
12+
container:
13+
image: ghcr.io/noaa-gfdl/fms/fms-ci-rocky-gnu:12.3.0
14+
credentials:
15+
username: ${{ github.actor }}
16+
password: ${{ secrets.github_token }}
17+
env:
18+
CC: mpicc
19+
FC: mpif90
20+
CPPFLAGS: '-I/opt/view/include'
21+
FFLAGS: '-fallow-argument-mismatch' # mkmf uses FFLAGS instead of FC
22+
LDFLAGS: '-L/opt/view/lib'
23+
steps:
24+
- name: Checkout FMS
25+
uses: actions/checkout@v4
26+
with:
27+
path: FMS
28+
- name: Checkout FMScoupler
29+
uses: actions/checkout@v4
30+
with:
31+
repository: 'NOAA-GFDL/FMScoupler'
32+
path: FMScoupler
33+
- name: Test Null build
34+
run: FMScoupler/t/null_model_build.sh --local-fms
Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ on:
66
types: [published]
77
workflow_dispatch:
88
jobs:
9-
update_docs:
9+
build:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Checkout code
13-
uses: actions/checkout@v2
13+
uses: actions/checkout@v4
1414
- name: Setup repo
1515
run: | # do autotool's job for substitutes since we don't need a full build environement
1616
mkdir gen_docs
@@ -23,8 +23,26 @@ jobs:
2323
run: |
2424
sudo apt -y install doxygen graphviz
2525
doxygen gen_docs/Doxyfile
26-
- name: Deploy
27-
uses: peaceiris/actions-gh-pages@v3
26+
- name: Upload Pages Artifact
27+
uses: actions/upload-pages-artifact@v1
2828
with:
29-
github_token: ${{ secrets.GITHUB_TOKEN }}
30-
publish_dir: ./gen_docs/html
29+
path: 'gen_docs/html'
30+
deploy:
31+
needs: build
32+
33+
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
34+
permissions:
35+
pages: write # to deploy to Pages
36+
id-token: write # to verify the deployment originates from an appropriate source
37+
38+
# Deploy to the github-pages environment
39+
environment:
40+
name: github-pages
41+
url: ${{ steps.deployment.outputs.page_url }}
42+
43+
# Specify runner + deployment step
44+
runs-on: ubuntu-latest
45+
steps:
46+
- name: Deploy to GitHub Pages
47+
id: deployment
48+
uses: actions/deploy-pages@v1
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
runs-on: ubuntu-latest
88
steps:
99
- name: Checkout code
10-
uses: actions/checkout@v2
10+
uses: actions/checkout@v4
1111
- name: Run Lint
1212
uses: NOAA-GFDL/simple_lint@f5aa1fe976bd4c231db0536ba00cbfdc26708253
1313
with:
File renamed without changes.

0 commit comments

Comments
 (0)