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

Add tests for ccpp_prebuild step #972

Merged
merged 55 commits into from
Oct 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
6a726ba
Initial commit
Oct 12, 2022
2437545
update CI
Oct 12, 2022
a3a049e
update CI
Oct 12, 2022
b26eca1
update CI
Oct 12, 2022
8cec93b
update CI
Oct 12, 2022
aa2664d
update CI
Oct 12, 2022
6a69e7c
update CI for fv3
Oct 12, 2022
3db6215
update CI for fv3
Oct 12, 2022
7aa47f9
update CI for fv3
Oct 12, 2022
bb140fc
update CI for fv3
Oct 12, 2022
401122b
update CI for fv3
Oct 12, 2022
ef273f5
update CI for fv3
Oct 12, 2022
b71284a
update CI for fv3
Oct 12, 2022
cd3d206
update to CI
Oct 12, 2022
ded8ce9
update to CI
Oct 12, 2022
b5767ca
update to CI
Oct 12, 2022
0385133
update to CI
Oct 12, 2022
f21feec
update to CI
Oct 12, 2022
a3e74bf
update to CI
Oct 12, 2022
b2f5c4d
update to CI
Oct 12, 2022
cdbf2f5
update to CI
Oct 12, 2022
1aff1b7
update to CI
Oct 12, 2022
6120509
update to CI
Oct 12, 2022
ecfe481
update to CI
Oct 12, 2022
142c799
update to CI
Oct 12, 2022
3a0641e
update to CI
Oct 12, 2022
716900f
update to CI
Oct 12, 2022
a11d566
update to CI
Oct 12, 2022
9d93c0c
update to CI
Oct 12, 2022
071cb33
update to CI
Oct 12, 2022
8855fd5
update to CI
Oct 12, 2022
6e0ee28
update to CI
Oct 12, 2022
1eb1740
update to CI
Oct 12, 2022
8a4ea15
update to CI
Oct 12, 2022
defc268
update to CI
Oct 12, 2022
6358b56
update to CI
Oct 12, 2022
c2d6feb
update to CI
Oct 12, 2022
bb3cbd9
update to CI
Oct 12, 2022
ed86940
update to CI
Oct 12, 2022
e66d159
update to CI
Oct 12, 2022
b2cd9aa
update to CI
Oct 12, 2022
8ba4760
update to CI
Oct 12, 2022
61f9670
Housekeeping
dustinswales Oct 19, 2022
ac43a97
Housekeeping
dustinswales Oct 19, 2022
4f789c6
Update CI
dustinswales Oct 19, 2022
e84694e
Update CI
dustinswales Oct 19, 2022
5e02827
Update CI
dustinswales Oct 19, 2022
e64a754
Update CI
dustinswales Oct 19, 2022
3098318
Update CI
dustinswales Oct 19, 2022
4ba2ba4
Update CI
dustinswales Oct 19, 2022
ba2dbbd
Update CI
dustinswales Oct 19, 2022
1fb225b
Update CI
dustinswales Oct 19, 2022
66212c0
Update CI
dustinswales Oct 19, 2022
b3f68a0
Update CI
dustinswales Oct 19, 2022
07add40
Update CI
dustinswales Oct 19, 2022
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
58 changes: 58 additions & 0 deletions .github/workflows/ci_fv3_ccpp_prebuild.yml
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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the first pass at this, I don't see a problem with parsing all suites, but we may want to define a shorter list to parse at some point to make these tests run faster?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That sounds like a good idea. I'll add a note for us to discuss this.

63 changes: 63 additions & 0 deletions .github/workflows/ci_scm_ccpp_prebuild.yml
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