From 080436246c271de23f393f68d1f99612e6730d7d Mon Sep 17 00:00:00 2001 From: manishvenu <80477243+manishvenu@users.noreply.github.com> Date: Tue, 27 Aug 2024 15:54:22 -0600 Subject: [PATCH] Add first attempt at running Standalone MOM Added: 1. Build Job: Checkout CESM, Load Externals (Including MOM6) 2. Test_lightweight_standalone_mom Job: Run MOM6 on some sample test cases --- .github/workflows/general-ci-tests.yml | 62 +++++++++++++++----------- 1 file changed, 36 insertions(+), 26 deletions(-) diff --git a/.github/workflows/general-ci-tests.yml b/.github/workflows/general-ci-tests.yml index ceacd58..83293ec 100644 --- a/.github/workflows/general-ci-tests.yml +++ b/.github/workflows/general-ci-tests.yml @@ -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 @@ -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 @@ -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