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

Update CI in MOM_interface so that "check_standalone_mom_build_and_run_lightweight_examples" works on MOM_interface forks #234

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
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
45 changes: 23 additions & 22 deletions .github/workflows/general-ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,38 +32,39 @@ jobs:
sudo apt-get install linux-tools-common
sudo apt-get install -y csh
echo "::endgroup::"


- name: Checkout MOM_interface to temp folder
uses: actions/checkout@v4
with:
submodules: recursive
path: MOM_interface_temp

# Checkout CESM (default branch) and externals
- name: Checkout CESM and Externals
- name: Checkout CESM
uses: actions/checkout@v4
with:
repository: ESCOMP/CESM
path: CESM

# Run git-fleximod
- name: Checkout CESM Submodules
env:
GIT_CLONE_PROTECTION_ACTIVE: false
run: |
git clone https://github.com/ESCOMP/CESM.git
cd CESM
./bin/git-fleximod update

# Checkout the correct MOM Branch
- name: Checkout initial event (Pull Request)
if: ${{ github.event_name == 'pull_request' }}
run: |
echo "Handling pull request"
cd $GITHUB_WORKSPACE/CESM/components/mom/
git fetch origin pull/${{ github.event.pull_request.number }}/head:pr-${{ github.event.pull_request.number }}
git checkout pr-${{ github.event.pull_request.number }}
git submodule update --init --recursive

- name: Checkout initial event (Push)
if: ${{ github.event_name == 'push' }}
run: |
echo "Handling push"
cd $GITHUB_WORKSPACE/CESM/components/mom/
git checkout ${{ github.sha }}
git submodule update --init --recursive

- name: Check submodule hash consistency
- name: Check submodule hash consistency (Seperate Test)
run: |
echo "Checking if .gitmodules and external hashes are consistent"
cd $GITHUB_WORKSPACE/CESM/components/mom/
../../bin/git-fleximod test

# Copy the correct MOM_interface Branch to the CESM
- name: Copy the current MOM_interface to the correct place in CESM
run: |
cp -r $GITHUB_WORKSPACE/MOM_interface_temp/* $GITHUB_WORKSPACE/CESM/components/mom/

# Build the standalone mom using the ubuntu script.
- name: Build Standalone MOM
run: |
Expand Down
Loading