Skip to content

Commit

Permalink
Merge pull request #223 from mom-ocean/main
Browse files Browse the repository at this point in the history
Bring in latest main changes (GFDL to main 2022-07-21)
  • Loading branch information
gustavo-marques authored Aug 5, 2022
2 parents d9ec82e + d4d7fbe commit 0b5cd6f
Show file tree
Hide file tree
Showing 139 changed files with 7,459 additions and 3,386 deletions.
5 changes: 3 additions & 2 deletions .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ coverage:
threshold: 100%
base: parent
comment:
# This must be set to the number of test cases (TCs)
after_n_builds: 8
# This is set to the number of TCs, plus unit, but can be removed
# (i.e. set to 1) when reporting is separated from coverage.
after_n_builds: 9
17 changes: 17 additions & 0 deletions .github/actions/macos-setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: 'install-macos-prerequisites'

description: 'Install prerequisites for Mac OS compilation'

runs:
using: 'composite'

steps:
- name: Install macOS packages
shell: bash
run: |
echo "::group::Install packages"
brew update
brew install automake
brew install netcdf
brew install mpich
echo "::endgroup::"
10 changes: 0 additions & 10 deletions .github/actions/testing-setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,6 @@ runs:
env
echo "::endgroup::"
- name: Install needed packages for compiling
shell: bash
run: |
echo "::group::Install linux packages"
sudo apt-get update
sudo apt-get install netcdf-bin libnetcdf-dev libnetcdff-dev mpich libmpich-dev
sudo apt-get install linux-tools-common
echo "::endgroup::"
- name: Compile FMS library
shell: bash
run: |
Expand All @@ -52,7 +43,6 @@ runs:
echo "FCFLAGS_DEBUG=-g -O0 -Wextra -Wno-compare-reals -fbacktrace -ffpe-trap=invalid,zero,overflow -fcheck=bounds" >> config.mk
echo "FCFLAGS_REPRO=-g -O2 -fbacktrace" >> config.mk
echo "FCFLAGS_INIT=-finit-real=snan -finit-integer=2147483647 -finit-derived" >> config.mk
echo "FCFLAGS_COVERAGE=--coverage" >> config.mk
cat config.mk
echo "::endgroup::"
Expand Down
19 changes: 19 additions & 0 deletions .github/actions/ubuntu-setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: 'install-ubuntu-prerequisites'

description: 'Install prerequisites for Ubuntu Linux compilation'

runs:
using: 'composite'
steps:
- name: Install Ubuntu Linux packages
shell: bash
run: |
echo "::group::Install linux packages"
sudo apt-get update
sudo apt-get install netcdf-bin
sudo apt-get install libnetcdf-dev
sudo apt-get install libnetcdff-dev
sudo apt-get install mpich
sudo apt-get install libmpich-dev
sudo apt-get install linux-tools-common
echo "::endgroup::"
2 changes: 2 additions & 0 deletions .github/workflows/coupled-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:
with:
submodules: recursive

- uses: ./.github/actions/ubuntu-setup

- uses: ./.github/actions/testing-setup
with:
build_symmetric: 'false'
Expand Down
13 changes: 12 additions & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,18 @@ jobs:
with:
submodules: recursive

- uses: ./.github/actions/ubuntu-setup

- uses: ./.github/actions/testing-setup

- name: Compile unit testing
run: make -j build/unit/MOM6

- name: Run unit tests
run: make unit.cov.upload

- name: Compile MOM6 with code coverage
run: make -j build/cov/MOM6

- name: Run and post coverage
run: make run.symmetric -k -s
run: make run.cov -k -s
2 changes: 2 additions & 0 deletions .github/workflows/expression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:
with:
submodules: recursive

- uses: ./.github/actions/ubuntu-setup

- uses: ./.github/actions/testing-setup

- name: Compile MOM6 using repro optimization
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/macos-regression.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: MacOS regression

on: [pull_request]

jobs:
test-macos-regression:

runs-on: macOS-latest

env:
CC: gcc-11
FC: gfortran-11

defaults:
run:
working-directory: .testing

steps:
- uses: actions/checkout@v2
with:
submodules: recursive

- uses: ./.github/actions/macos-setup

- uses: ./.github/actions/testing-setup

- name: Compile reference model
run: make build.regressions MOM_TARGET_SLUG=$GITHUB_REPOSITORY MOM_TARGET_LOCAL_BRANCH=$GITHUB_BASE_REF DO_REGRESSION_TESTS=true -j

- name: Create validation data
run: make run.symmetric -k -s

- name: Regression test
run: make test.regression DO_REGRESSION_TESTS=true -k -s
34 changes: 34 additions & 0 deletions .github/workflows/macos-stencil.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: MacOS stencil tests

on: [push, pull_request]

jobs:
test-macos-stencil:

runs-on: macOS-latest

env:
CC: gcc-11
FC: gfortran-11

defaults:
run:
working-directory: .testing

steps:
- uses: actions/checkout@v2
with:
submodules: recursive

- uses: ./.github/actions/macos-setup

- uses: ./.github/actions/testing-setup

- name: Compile MOM6 in asymmetric memory mode
run: make build/asymmetric/MOM6 -j

- name: Create validation data
run: make run.symmetric -k -s

- name: Run tests
run: make test.grid test.layout test.rotate -k -s
2 changes: 2 additions & 0 deletions .github/workflows/other.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:
with:
submodules: recursive

- uses: ./.github/actions/ubuntu-setup

- uses: ./.github/actions/testing-setup

- name: Compile with openMP
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/perfmon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:
with:
submodules: recursive

- uses: ./.github/actions/ubuntu-setup

- uses: ./.github/actions/testing-setup

- name: Compile optimized models
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/regression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:
with:
submodules: recursive

- uses: ./.github/actions/ubuntu-setup

- uses: ./.github/actions/testing-setup

- name: Compile reference model
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/stencil.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:
with:
submodules: recursive

- uses: ./.github/actions/ubuntu-setup

- uses: ./.github/actions/testing-setup

- name: Compile MOM6 in asymmetric memory mode
Expand Down
Loading

0 comments on commit 0b5cd6f

Please sign in to comment.