Skip to content

Commit

Permalink
Update general-ci-tests.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
manishvenu authored Aug 29, 2024
1 parent f9bb1fd commit 6f10075
Showing 1 changed file with 21 additions and 11 deletions.
32 changes: 21 additions & 11 deletions .github/workflows/general-ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
jobs:
# This workflow contains 4 jobs
# Build checks out MOM through the CESM and lets us run the standalone version
build_standalone_mom:
check_standalone_mom_lightweight_examples:
# The type of runner that the job will run on
runs-on: ubuntu-latest

Expand Down Expand Up @@ -40,10 +40,22 @@ jobs:
git clone https://github.com/ESCOMP/CESM.git -b cesm3_0_alpha03a cesm3_0_alpha03a
cd cesm3_0_alpha03a
./bin/git-fleximod update
- name: Checkout MOM Branch
# Checkout the correct MOM Branch
- name: Handle Pull Request
if: ${{ github.event_name == 'pull_request' }}
run: |
echo "Handling pull request"
cd $GITHUB_WORKSPACE/cesm3_0_alpha03a/components/mom/
git checkout main
git fetch origin pull/${{ github.event.pull_request.number }}/head:pr-${{ github.event.pull_request.number }}
git checkout pr-${{ github.event.pull_request.number }}
- name: Handle Push
if: ${{ github.event_name == 'push' }}
run: |
echo "Handling push"
cd $GITHUB_WORKSPACE/cesm3_0_alpha03a/components/mom/
git checkout ${{ github.sha }}
- name: Build Standalone MOM
run: |
cd $GITHUB_WORKSPACE/cesm3_0_alpha03a/components/mom/standalone/build
Expand All @@ -54,19 +66,17 @@ jobs:
with:
## If no one connects after 5 minutes, shut down server.
wait-timeout-minutes: 5
# The takes the build we just made and runs the standalone mom
check_standalone_mom_lightweight_examples:

runs-on: ubuntu-latest
needs: build_standalone_mom

steps:

# CDs into a couple MOM examples and runs MOM in them. These are very light weight.
- name: Run Double Gyre Test
run: |
cd $GITHUB_WORKSPACE/cesm3_0_alpha03a/components/mom/standalone/examples/double_gyre
$GITHUB_WORKSPACE/cesm3_0_alpha03a/components/mom/standalone/build/gnu/MOM6/MOM6
- name: Setup upterm session
uses: lhotari/action-upterm@v1
if: ${{ failure() }}
with:
## If no one connects after 5 minutes, shut down server.
wait-timeout-minutes: 5
- name: Run Single Column KPP Test
run: |
cd $GITHUB_WORKSPACE/cesm3_0_alpha03a/components/mom/standalone/examples/single_column/KPP
Expand Down

0 comments on commit 6f10075

Please sign in to comment.