forked from NCAR/ccpp-physics
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'ufs/dev' of https://github.com/ufs-community/ccpp-physics…
… into HEAD
- Loading branch information
Showing
2 changed files
with
121 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: CI test to run FV3 ccpp_prebuild step | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build-linux: | ||
|
||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
strategy: | ||
max-parallel: 5 | ||
|
||
steps: | ||
- name: Checkout current ccpp-physics code | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
|
||
- 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 fv3atm | ||
run: git clone https://github.com/NOAA-EMC/fv3atm.git | ||
|
||
- name: Initialize submodules | ||
run: | | ||
cd /home/runner/work/ccpp-physics/ccpp-physics/fv3atm | ||
git submodule update --init --recursive | ||
- name: Update ccpp-physics hash in fv3atm | ||
if: github.event.pull_request == false | ||
run: | | ||
cd /home/runner/work/ccpp-physics/ccpp-physics/fv3atm/ccpp/physics | ||
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: Add conda to system path | ||
run: | | ||
# $CONDA is an environment variable pointing to the root of the miniconda directory | ||
echo $CONDA/bin >> $GITHUB_PATH | ||
- name: Run ccpp_prebuild.py | ||
run: | | ||
cd /home/runner/work/ccpp-physics/ccpp-physics/fv3atm/ccpp/ | ||
mkdir -p /home/runner/work/ccpp-physics/ccpp-physics/fv3atm/bin/ccpp/physics/physics/ | ||
./framework/scripts/ccpp_prebuild.py --config config/ccpp_prebuild_config.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: CI test to run SCM ccpp_prebuild step | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build-linux: | ||
|
||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
strategy: | ||
max-parallel: 5 | ||
|
||
steps: | ||
|
||
- name: Checkout current ccpp-physics 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-physics/ccpp-physics/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-physics/ccpp-physics/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: Add conda to system path | ||
run: | | ||
# $CONDA is an environment variable pointing to the root of the miniconda directory | ||
echo $CONDA/bin >> $GITHUB_PATH | ||
- name: Run ccpp_prebuild.py | ||
run: | | ||
cd /home/runner/work/ccpp-physics/ccpp-physics/ccpp-scm/ | ||
git status | ||
mkdir -p /home/runner/work/ccpp-physics/ccpp-physics/ccpp-scm/scm/bin/ccpp/physics/physics/ | ||
./ccpp/framework/scripts/ccpp_prebuild.py --config ccpp/config/ccpp_prebuild_config.py |