Skip to content

Commit

Permalink
Initial commit of prebuild tests of ccpp-framework changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
mwaxmonsky committed Dec 18, 2023
1 parent e86d0a7 commit 1f49006
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/capgen_prebuild_tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: CI test to run SCM ccpp_prebuild step

on: [push, pull_request]

jobs:
ccpp-prebuild-SCM:

# The type of runner that the job will run on
runs-on: ubuntu-20.04

steps:

- name: Checkout current ccpp-framework code
uses: actions/checkout@v3

- name: Store remote-URL for current ccpp-physics code
run: echo "GIT_REMOTE_URL=`git remote get-url origin`" >> $GITHUB_ENV

- name: Store branch name for current ccpp-physics code
run: echo "GIT_REMOTE_BRANCH=`git rev-parse --abbrev-ref HEAD`" >> $GITHUB_ENV

- name: Store hash for HEAD of current ccpp-physics code
run: echo "GIT_REMOTE_HASH=`git rev-parse HEAD`" >> $GITHUB_ENV

- name: Checkout latest ccpp-scm code
run: git clone https://github.com/NCAR/ccpp-scm.git

- name: Initialize submodules
run: |
cd /home/runner/work/ccpp-framework/ccpp-framework/ccpp-scm
git submodule update --init --recursive
- name: Update ccpp-physics hash in ccpp-scm
if: github.event.pull_request == false
run: |
cd /home/runner/work/ccpp-framework/ccpp-framework/ccpp-scm/ccpp/physics
echo $GIT_REMOTE_URL
echo $GIT_REMOTE_BRANCH
echo ${{github.repository}}
echo ${{ github.event.pull_request.head.sha }}
echo $GITHUB_SHA
git remote add remote_local $GIT_REMOTE_URL
git fetch remote_local $GIT_REMOTE_BRANCH
git checkout remote_local/$GIT_REMOTE_BRANCH
- name: Set up Python 3.8.5
uses: actions/setup-python@v3
with:
python-version: 3.8.5

- name: Run ccpp_prebuild.py
run: |
cd /home/runner/work/ccpp-framework/ccpp-framework/ccpp-scm/
git status
mkdir -p /home/runner/work/ccpp-framework/ccpp-framework/ccpp-scm/scm/bin/ccpp/physics/physics/
./ccpp/framework/scripts/ccpp_prebuild.py --config ccpp/config/ccpp_prebuild_config.py

0 comments on commit 1f49006

Please sign in to comment.