Skip to content

Commit

Permalink
Add first attempt at running Standalone MOM
Browse files Browse the repository at this point in the history
Added:

1. Build Job: Checkout CESM, Load Externals (Including MOM6)
2. Test_lightweight_standalone_mom Job: Run MOM6 on some sample test cases
  • Loading branch information
manishvenu authored Aug 27, 2024
1 parent 6ec0ff0 commit 0804362
Showing 1 changed file with 36 additions and 26 deletions.
62 changes: 36 additions & 26 deletions .github/workflows/general-ci-tests.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# This is a basic workflow to help you get started with Actions

name: General MOM_interface CI

# Controls when the workflow will run
Expand All @@ -10,37 +8,49 @@ on:
pull_request:
branches: [ "138-set-up-github-actions-ci-testing" ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains [blank] jobs
# build:
# # The type of runner that the job will run on
# runs-on: ubuntu-latest
# This workflow contains 4 jobs
# Build checks out MOM through the CESM and lets us run the standalone version
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# # Steps represent a sequence of tasks that will be executed as part of the job
# steps:
# # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
# - uses: actions/checkout@v4
# Steps represent a sequence of tasks that will be executed as part of the job
steps:

# # Runs a single command using the runners shell
# - name: Run a one-line script
# run: echo Hello, world!
# Checkout CESM, Build MOM Standalone, can we add the pull request as the checkout?
- name: Checkout CESM and Build MOM Standalone
run: |
git clone https://github.com/ESCOMP/CESM.git -b cesm3_0_alpha03a cesm3_0_alpha03a
cd cesm3_0_alpha03a
./bin/git-fleximod update
cd components/mom
git checkout main
cd standalone/build
./build_examples-ncar.sh
# The takes the build we just made and runs the standalone mom
test_lightweight_standalone_mom:

runs-on: ubuntu-latest
needs: build

steps:

# # Runs a set of commands using the runners shell
# - name: Run a multi-line script
# run: |
# echo Add other actions to build,
# echo test, and deploy your project.
# CDs into a couple MOM examples and runs MOM in them. These are very light weight.
- name: Run simple mom tests
run: |
cd $HOME/cesm3_0_alpha03a/components/mom/standalone/examples/double_gyre
$HOME/cesm3_0_alpha03a/components/mom/standalone/build/intel/MOM6/MOM6
cd $HOME/cesm3_0_alpha03a/components/mom/standalone/examples/single_column/KPP
$HOME/cesm3_0_alpha03a/components/mom/standalone/build/intel/MOM6/MOM6
# Job to run the check_default_params test
check_default_params_job:
# The type of runner that the job will run on

runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
# This runs the check_default_params test
steps:
# Checkout the repo
- uses: actions/checkout@v4
Expand All @@ -50,10 +60,10 @@ jobs:

# Job to run the black formatter for cime_config
black_check_for_cime_config:
# The type of runner that the job will run on

runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
# This performs black formatting checks in the cime_config folder
steps:
# Checkout the repo
- uses: actions/checkout@v4
Expand Down

0 comments on commit 0804362

Please sign in to comment.