Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restructued the GitHub Actions CI #11

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 6 additions & 67 deletions .github/actions/macos-setup/action.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,12 @@
name: 'Build-.testing-prerequisites'
description: 'Build pre-requisites for .testing including FMS and a symmetric MOM6 executable'
inputs:
build_symmetric:
description: 'If true, will build the symmetric MOM6 executable'
required: false
default: 'true'
install_python:
description: 'If true, will install the local python env needed for .testing'
required: false
default: 'true'
name: 'install-macos-prerequisites'

description: 'Install prerequisites for Mac OS compilation'

runs:
using: 'composite'
steps:
- name: Git info
shell: bash
run: |
echo "::group::Git commit info"
echo "git log:"
git log | head -60
echo "::endgroup::"

- name: Env
shell: bash
run: |
echo "::group::Environment"
env
echo "::endgroup::"

- name: Install needed packages for compiling
steps:
- name: Install macOS packages
shell: bash
run: |
echo "::group::Install packages"
Expand All @@ -37,43 +16,3 @@ runs:
brew install netcdf
brew install mpich
echo "::endgroup::"

- name: Compile FMS library
shell: bash
run: |
echo "::group::Compile FMS library"
cd .testing
make deps/lib/libFMS.a -s -j
echo "::endgroup::"

- name: Store compiler flags used in Makefile
shell: bash
run: |
echo "::group::config.mk"
cd .testing
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
cat config.mk
echo "::endgroup::"

- name: Compile MOM6 in symmetric memory mode
shell: bash
run: |
echo "::group::Compile MOM6 in symmetric memory mode"
cd .testing
test ${{ inputs.build_symmetric }} == true && make build/symmetric/MOM6 -j
echo "::endgroup::"

- name: Install local python venv for generating input data
shell: bash
run: |
echo "::group::Create local python env for input data generation"
cd .testing
test ${{ inputs.install_python }} == true && make work/local-env
echo "::endgroup::"

- name: Set flags
shell: bash
run: |
echo "TIMEFORMAT=... completed in %lR (user: %lU, sys: %lS)" >> $GITHUB_ENV
9 changes: 0 additions & 9 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 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
2 changes: 2 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ jobs:
with:
submodules: recursive

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

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

- name: Compile unit testing
Expand Down
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
33 changes: 0 additions & 33 deletions .github/workflows/macos.yml

This file was deleted.

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