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

BASH wrapper to create_experiment.py #1788

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
196 commits
Select commit Hold shift + click to select a range
9ba6c00
Update driver.sh
TerrenceMcGuinness-NOAA Jun 7, 2023
03e3e39
Merge branch 'NOAA-EMC:develop' into develop
TerrenceMcGuinness-NOAA Jun 9, 2023
5e4d690
Merge branch 'NOAA-EMC:develop' into develop
TerrenceMcGuinness-NOAA Jun 13, 2023
d792096
Merge branch 'NOAA-EMC:develop' into develop
TerrenceMcGuinness-NOAA Jun 14, 2023
e6fb30b
Update driver.sh
TerrenceMcGuinness-NOAA Jun 7, 2023
9f7352f
Merge branch 'develop' of github.com:TerrenceMcGuinness-NOAA/global-w…
TerryMcGuinness-NOAA Jun 15, 2023
38e0917
Merge branch 'NOAA-EMC:develop' into develop
TerrenceMcGuinness-NOAA Jun 15, 2023
6101b70
Merge branch 'develop' of github.com:TerrenceMcGuinness-NOAA/global-w…
TerryMcGuinness-NOAA Jun 15, 2023
fe1dcde
Merge branch 'NOAA-EMC:develop' into develop
TerrenceMcGuinness-NOAA Jun 15, 2023
fa9e3e0
Merge branch 'develop' of github.com:TerrenceMcGuinness-NOAA/global-w…
TerryMcGuinness-NOAA Jun 15, 2023
4bfa873
Merge branch 'develop' of github.com:TerrenceMcGuinness-NOAA/global-w…
TerryMcGuinness-NOAA Jun 23, 2023
d0bdf58
Merge branch 'develop' of github.com:TerrenceMcGuinness-NOAA/global-w…
TerryMcGuinness-NOAA Jun 26, 2023
79f06b7
Merge branch 'develop' of github.com:TerrenceMcGuinness-NOAA/global-w…
TerryMcGuinness-NOAA Jun 28, 2023
5eef690
Merge branch 'develop' of github.com:TerrenceMcGuinness-NOAA/global-w…
TerryMcGuinness-NOAA Jun 28, 2023
daf3f90
added selfhosted.yaml test file
TerryMcGuinness-NOAA Jun 28, 2023
9481e51
updated for merge
TerryMcGuinness-NOAA Jun 28, 2023
e018b99
changed name of Action
TerryMcGuinness-NOAA Jun 28, 2023
6b64b58
Added GitHub action for running build script on Orion
TerryMcGuinness-NOAA Jun 29, 2023
57c6d7c
no op for testing
TerryMcGuinness-NOAA Jun 29, 2023
9db0274
Update selfhosted.yaml
TerrenceMcGuinness-NOAA Jun 29, 2023
ea188e0
Update selfhosted.yaml
TerrenceMcGuinness-NOAA Jun 29, 2023
bc08d9a
added second label back
TerryMcGuinness-NOAA Jun 29, 2023
c0601d5
added mkdir in clone script because was in driver
TerryMcGuinness-NOAA Jun 29, 2023
f303727
changed path to build script to point to dev space
TerryMcGuinness-NOAA Jun 29, 2023
0f62aa4
hard coded GH in clone-build script
TerryMcGuinness-NOAA Jun 29, 2023
038a9b9
Update selfhosted.yaml
TerrenceMcGuinness-NOAA Jun 29, 2023
b4fc77a
Update selfhosted.yaml
TerrenceMcGuinness-NOAA Jun 29, 2023
3486d35
pull request labeled
TerryMcGuinness-NOAA Jun 29, 2023
8d8628f
pull request labeled
TerryMcGuinness-NOAA Jun 29, 2023
0c4d393
just create label
TerryMcGuinness-NOAA Jun 29, 2023
f0dce6d
Merge branch 'NOAA-EMC:develop' into selfhosted-Runner
TerrenceMcGuinness-NOAA Jun 30, 2023
19891d5
Merge branch 'develop' of github.com:TerrenceMcGuinness-NOAA/global-w…
TerryMcGuinness-NOAA Jun 30, 2023
0869e1a
added workflow action for building on orion with env vars
TerryMcGuinness-NOAA Jun 30, 2023
5e388b3
added single global action file
TerryMcGuinness-NOAA Jun 30, 2023
437c7b8
Merge pull request #151 from TerrenceMcGuinness-NOAA/selfhosted-Runner
TerrenceMcGuinness-NOAA Jun 30, 2023
8533f21
added no op to globalworkflow
TerryMcGuinness-NOAA Jun 30, 2023
cdb8cf9
removed line continuation delemters
TerryMcGuinness-NOAA Jun 30, 2023
4237a02
Merge pull request #152 from TerrenceMcGuinness-NOAA/selfhosted-Runner
TerrenceMcGuinness-NOAA Jun 30, 2023
151facf
no up testing
TerryMcGuinness-NOAA Jun 30, 2023
6937f55
removed the BASH script from the build action
TerryMcGuinness-NOAA Jul 3, 2023
25f329a
Merge pull request #153 from TerrenceMcGuinness-NOAA/selfhosted-Runner
TerrenceMcGuinness-NOAA Jul 3, 2023
0d626d9
no op for testing
TerryMcGuinness-NOAA Jul 3, 2023
a148081
added working-directy to actions build
TerryMcGuinness-NOAA Jul 3, 2023
2b3fca8
added working dir to actions build
TerryMcGuinness-NOAA Jul 3, 2023
d392d08
added working dir to actions build
TerryMcGuinness-NOAA Jul 3, 2023
32b1ca9
removed no op for testing
TerryMcGuinness-NOAA Jul 3, 2023
07bab9d
Update globalworkflow-ci.yaml
TerrenceMcGuinness-NOAA Jul 3, 2023
808cac6
Update globalworkflow-ci.yaml
TerrenceMcGuinness-NOAA Jul 3, 2023
f211a4b
Merge branch 'develop_ci_actions' into selfhosted-Runner
TerrenceMcGuinness-NOAA Jul 3, 2023
321656c
testing clone action
TerryMcGuinness-NOAA Jul 3, 2023
5e6b089
Update globalworkflow-ci.yaml
TerrenceMcGuinness-NOAA Jul 3, 2023
91c0984
updated env to vars for workflow dir
TerryMcGuinness-NOAA Jul 3, 2023
cae25f0
no up test vars
TerryMcGuinness-NOAA Jul 3, 2023
c2b5bbb
Merge branch 'selfhosted-Runner' of github.com:TerrenceMcGuinness-NOA…
TerryMcGuinness-NOAA Jul 3, 2023
c917e94
hard coded GFS_CI_ROOT on Orion
TerryMcGuinness-NOAA Jul 3, 2023
abebbb7
hard coded GFS_CI_ROOT on Orion
TerryMcGuinness-NOAA Jul 3, 2023
3e63393
testing working-directory
TerryMcGuinness-NOAA Jul 3, 2023
6ab9cda
Update globalworkflow-ci.yaml
TerrenceMcGuinness-NOAA Jul 3, 2023
4f86989
Update globalworkflow-ci.yaml
TerrenceMcGuinness-NOAA Jul 3, 2023
1663eb8
Update globalworkflow-ci.yaml
TerrenceMcGuinness-NOAA Jul 3, 2023
f069674
Update globalworkflow-ci.yaml
TerrenceMcGuinness-NOAA Jul 3, 2023
fad5229
Merge branch 'develop_ci_actions' into selfhosted-Runner
TerrenceMcGuinness-NOAA Jul 3, 2023
7cb1a76
Update globalworkflow-ci.yaml
TerrenceMcGuinness-NOAA Jul 3, 2023
207749a
added relative path for PR on clone build
TerryMcGuinness-NOAA Jul 3, 2023
1d20d24
added first pass of createing experment
TerryMcGuinness-NOAA Jul 3, 2023
3b1b7c6
added label updates and paths in creating experment
TerryMcGuinness-NOAA Jul 3, 2023
65af291
added dependances between jobs
TerryMcGuinness-NOAA Jul 3, 2023
5d95a64
added dependances between build and create experment jobs
TerryMcGuinness-NOAA Jul 3, 2023
abc8a3f
Update globalworkflow-ci.yaml
TerrenceMcGuinness-NOAA Jul 3, 2023
8b1a93f
Update globalworkflow-ci.yaml
TerrenceMcGuinness-NOAA Jul 4, 2023
dddab51
Update globalworkflow-ci.yaml
TerrenceMcGuinness-NOAA Jul 4, 2023
f173224
Update globalworkflow-ci.yaml
TerrenceMcGuinness-NOAA Jul 4, 2023
dde0927
Update globalworkflow-ci.yaml
TerrenceMcGuinness-NOAA Jul 4, 2023
bc05158
Update globalworkflow-ci.yaml
TerrenceMcGuinness-NOAA Jul 4, 2023
bf53fdd
Update globalworkflow-ci.yaml
TerrenceMcGuinness-NOAA Jul 4, 2023
6507fcb
Update globalworkflow-ci.yaml
TerrenceMcGuinness-NOAA Jul 4, 2023
599646d
Update globalworkflow-ci.yaml
TerrenceMcGuinness-NOAA Jul 4, 2023
3367396
Update globalworkflow-ci.yaml
TerrenceMcGuinness-NOAA Jul 4, 2023
f6ed6ea
Update globalworkflow-ci.yaml
TerrenceMcGuinness-NOAA Jul 4, 2023
a53e9bb
Update globalworkflow-ci.yaml
TerrenceMcGuinness-NOAA Jul 4, 2023
8f653a1
Update globalworkflow-ci.yaml
TerrenceMcGuinness-NOAA Jul 4, 2023
bde3389
Update globalworkflow-ci.yaml
TerrenceMcGuinness-NOAA Jul 4, 2023
229dd09
Delete globalworkflow-ci.yaml
TerrenceMcGuinness-NOAA Jul 5, 2023
845181d
no op
TerryMcGuinness-NOAA Jul 5, 2023
c9e0900
adding back global workflow actions
TerryMcGuinness-NOAA Jul 5, 2023
2219ac7
Update globalworkflow-ci.yaml
TerrenceMcGuinness-NOAA Jul 5, 2023
b129d20
Update globalworkflow-ci.yaml
TerrenceMcGuinness-NOAA Jul 5, 2023
ea120c6
Update globalworkflow-ci.yaml
TerrenceMcGuinness-NOAA Jul 5, 2023
ec917a3
Update globalworkflow-ci.yaml
TerrenceMcGuinness-NOAA Jul 5, 2023
a94c748
Update globalworkflow-ci.yaml
TerrenceMcGuinness-NOAA Jul 5, 2023
1d6472f
Update globalworkflow-ci.yaml
TerrenceMcGuinness-NOAA Jul 5, 2023
11f8c93
Update globalworkflow-ci.yaml
TerrenceMcGuinness-NOAA Jul 5, 2023
43fb5b8
Update globalworkflow-ci.yaml
TerrenceMcGuinness-NOAA Jul 5, 2023
08aa0ed
Update globalworkflow-ci.yaml
TerrenceMcGuinness-NOAA Jul 5, 2023
04a627c
added job for running rocotorun and check in self-hosted runner
TerryMcGuinness-NOAA Jul 5, 2023
a136fc9
removed comments on building the kernals
TerryMcGuinness-NOAA Jul 5, 2023
dfee105
Update globalworkflow-ci.yaml
TerrenceMcGuinness-NOAA Jul 5, 2023
1da2894
Update globalworkflow-ci.yaml
TerrenceMcGuinness-NOAA Jul 5, 2023
1ada88f
added wait before running rocotorun again
TerryMcGuinness-NOAA Jul 5, 2023
d23df36
Merge branch 'selfhosted-Runner' of github.com:TerrenceMcGuinness-NOA…
TerryMcGuinness-NOAA Jul 5, 2023
015b12d
Update globalworkflow-ci.yaml
TerrenceMcGuinness-NOAA Jul 5, 2023
23f45bd
typo fix in run_ci_looped file name
TerryMcGuinness-NOAA Jul 5, 2023
c297e21
Merge branch 'selfhosted-Runner' of github.com:TerrenceMcGuinness-NOA…
TerryMcGuinness-NOAA Jul 5, 2023
e397dde
relized conda was init-ed in runners env so put back gw_set.sh
TerryMcGuinness-NOAA Jul 5, 2023
097c2fd
Update orion.sh
TerrenceMcGuinness-NOAA Jul 5, 2023
bac5841
Update run_ci_looped.sh
TerrenceMcGuinness-NOAA Jul 5, 2023
1612481
Update check_ci.sh
TerrenceMcGuinness-NOAA Jul 5, 2023
7be9cb9
do while RUN_COMPLETE is FALSE
TerryMcGuinness-NOAA Jul 5, 2023
d8d9a66
fixed loop logic over rocotorun
TerryMcGuinness-NOAA Jul 5, 2023
0a3186d
fixed loop logic over rocotorun
TerryMcGuinness-NOAA Jul 5, 2023
b9be319
bash lint brackets
TerryMcGuinness-NOAA Jul 6, 2023
242e2f4
added label updates and comments to PR messaging
TerryMcGuinness-NOAA Jul 6, 2023
61ba7c6
Update globalworkflow-ci.yaml
TerrenceMcGuinness-NOAA Jul 6, 2023
9ea55fd
Update run-check_ci.sh
TerrenceMcGuinness-NOAA Jul 6, 2023
4f22815
Update globalworkflow-ci.yaml
TerrenceMcGuinness-NOAA Jul 6, 2023
22abf49
Update globalworkflow-ci.yaml
TerrenceMcGuinness-NOAA Jul 6, 2023
a25adad
added pr switch to gh messaging
TerryMcGuinness-NOAA Jul 6, 2023
772cc0b
added step for Building for label updates
TerryMcGuinness-NOAA Jul 6, 2023
759dfdd
updated messaging details for building status
TerryMcGuinness-NOAA Jul 6, 2023
4745e3a
Update globalworkflow-ci.yaml
TerrenceMcGuinness-NOAA Jul 6, 2023
c722e7e
Update globalworkflow-ci.yaml
TerrenceMcGuinness-NOAA Jul 6, 2023
72f496a
added label update Passed after success on run check in run-check BAS…
TerryMcGuinness-NOAA Jul 6, 2023
c3f3f94
Merge branch 'selfhosted-Runner' of github.com:TerrenceMcGuinness-NOA…
TerryMcGuinness-NOAA Jul 6, 2023
26f323b
Merge branch 'NOAA-EMC:develop' into selfhosted-Runner
TerrenceMcGuinness-NOAA Jul 6, 2023
6cc6e86
Update clone-build_ci.sh
TerrenceMcGuinness-NOAA Jul 6, 2023
d78d6c2
eliminate use of GH cli from actions
aerorahul Jul 7, 2023
bfa0a3d
Merge pull request #161 from aerorahul/feature/gw_orion_ci
TerrenceMcGuinness-NOAA Jul 7, 2023
5955b5c
Merge branch 'NOAA-EMC:develop' into selfhosted-Runner
TerrenceMcGuinness-NOAA Jul 7, 2023
4a668e4
no op to force PR diff
TerryMcGuinness-NOAA Jul 7, 2023
d16ef39
Update globalworkflow-ci.yaml
TerrenceMcGuinness-NOAA Jul 7, 2023
9efb2c2
seperate actions and run steps for labeling
TerryMcGuinness-NOAA Jul 8, 2023
9a8e752
Update globalworkflow-ci.yaml
TerrenceMcGuinness-NOAA Jul 8, 2023
8b23569
Update globalworkflow-ci.yaml
TerrenceMcGuinness-NOAA Jul 8, 2023
0eda427
seperate actions and run steps for labeling still
TerryMcGuinness-NOAA Jul 8, 2023
38b7ea5
Update globalworkflow-ci.yaml
TerrenceMcGuinness-NOAA Jul 9, 2023
d611b6a
Update globalworkflow-ci.yaml
TerrenceMcGuinness-NOAA Jul 9, 2023
0908ef2
removed if lines on label actions
TerryMcGuinness-NOAA Jul 9, 2023
6c95102
put || true back in echo for BASH linting
TerryMcGuinness-NOAA Jul 9, 2023
986971b
added global env.HOMEgfs into local BASH env and added pr number into…
TerryMcGuinness-NOAA Jul 10, 2023
51a56c9
Update globalworkflow-ci.yaml
TerrenceMcGuinness-NOAA Jul 10, 2023
f1c3a4b
Had to work around HOMEgfs not being an env var in BASH shell that ru…
TerryMcGuinness-NOAA Jul 10, 2023
955df5e
Update globalworkflow-ci.yaml
TerrenceMcGuinness-NOAA Jul 10, 2023
e44f1d3
the access token error is a GitHub glitch, juste needed to re-run
TerryMcGuinness-NOAA Jul 10, 2023
428eb49
Update globalworkflow-ci.yaml
TerrenceMcGuinness-NOAA Jul 10, 2023
717b364
extra dollor sign env HOMEgfs re-assiginment and PR no longer in path…
TerryMcGuinness-NOAA Jul 10, 2023
b6a9e86
added second test case via matrix systax
TerryMcGuinness-NOAA Jul 10, 2023
e3b7626
removed example conditionals on labeling Passed in release-lock
TerryMcGuinness-NOAA Jul 10, 2023
d4bf542
Update run-check_ci.sh
TerrenceMcGuinness-NOAA Jul 10, 2023
52aa49d
Merge branch 'NOAA-EMC:develop' into selfhosted-Runner
TerrenceMcGuinness-NOAA Jul 10, 2023
1d37abb
reduced time to wait between rocoto pings
TerryMcGuinness-NOAA Jul 10, 2023
7c2b583
Merge branch 'selfhosted-Runner' of github.com:TerrenceMcGuinness-NOA…
TerryMcGuinness-NOAA Jul 10, 2023
44b687e
Merge branch 'develop' of github.com:TerrenceMcGuinness-NOAA/global-w…
TerryMcGuinness-NOAA Jul 10, 2023
3a5d137
removed two cases for testing
TerryMcGuinness-NOAA Jul 10, 2023
f3b6403
added switch to create experment to tag pslot name
TerryMcGuinness-NOAA Jul 10, 2023
24064ee
Merge branch 'feature_1732_add-pslot-tag' of github.com:TerrenceMcGui…
TerryMcGuinness-NOAA Jul 10, 2023
a1aaf6e
updates for adding has to pslot name
TerryMcGuinness-NOAA Jul 10, 2023
3707a4a
Merge branch 'NOAA-EMC:develop' into feature_1732_add-pslot-tag
TerrenceMcGuinness-NOAA Jul 11, 2023
9777fe0
Merge branch 'NOAA-EMC:develop' into selfhosted-Runner
TerrenceMcGuinness-NOAA Jul 11, 2023
46e2935
Update globalworkflow-ci.yaml
TerrenceMcGuinness-NOAA Jul 11, 2023
115c799
fine tuning pslot with hash name
TerryMcGuinness-NOAA Jul 11, 2023
633f9fc
Merge branch 'feature_1732_add-pslot-tag' of github.com:TerrenceMcGui…
TerryMcGuinness-NOAA Jul 11, 2023
46afc35
put pslot into YAML case file and updated path to EXPDIR
TerryMcGuinness-NOAA Jul 11, 2023
e95ea05
put pslot into YAML case file and updated path to EXPDIR
TerryMcGuinness-NOAA Jul 11, 2023
84a70e7
Update create_experiment.py
TerrenceMcGuinness-NOAA Jul 11, 2023
ccf7ad5
moved pslot into env in run shell and added hash tag
TerryMcGuinness-NOAA Jul 11, 2023
357eab4
Merge branch 'selfhosted-Runner' of github.com:TerrenceMcGuinness-NOA…
TerryMcGuinness-NOAA Jul 11, 2023
68c63ec
added second case for testing
TerryMcGuinness-NOAA Jul 11, 2023
edeae69
: again in C48 for pslot
TerryMcGuinness-NOAA Jul 11, 2023
f43b6e9
used run.id intead o HASH
TerryMcGuinness-NOAA Jul 11, 2023
72fa539
tighten the runner dirs
aerorahul Jul 11, 2023
41bec08
Update globalworkflow-ci.yaml
TerrenceMcGuinness-NOAA Jul 11, 2023
2b3f859
Merge branch 'selfhosted-Runner' into feature/gw-orion-ci
aerorahul Jul 11, 2023
7fd81d4
remove deleted file
aerorahul Jul 11, 2023
cd55576
Merge branch 'selfhosted-Runner' into feature/gw-orion-ci
aerorahul Jul 11, 2023
0b88e32
Update globalworkflow-ci.yaml
TerrenceMcGuinness-NOAA Jul 12, 2023
e2068ba
Update create_experiment.py
TerrenceMcGuinness-NOAA Jul 12, 2023
cce01b2
fixed extra pslot removal in cron checks
TerryMcGuinness-NOAA Jul 12, 2023
f5b68e1
Update globalworkflow-ci.yaml
TerrenceMcGuinness-NOAA Jul 12, 2023
f293ee2
added max paralel exp run to two
TerryMcGuinness-NOAA Jul 12, 2023
b2a41e4
Merge branch 'selfhosted-Runner' of github.com:TerrenceMcGuinness-NOA…
TerryMcGuinness-NOAA Jul 12, 2023
de12e3e
removed -u from checkout
TerryMcGuinness-NOAA Jul 12, 2023
bbe306c
Merge branch 'feature/gw-orion-ci' of https://github.com/aerorahul/gl…
TerryMcGuinness-NOAA Jul 12, 2023
b18dba0
remove u from clone-build
TerryMcGuinness-NOAA Jul 12, 2023
d3f2395
Merge branch 'aerorahul-feature/gw-orion-ci' into selfhosted-Runner
TerryMcGuinness-NOAA Jul 12, 2023
634e523
Merge branch 'selfhosted-Runner' of github.com:TerrenceMcGuinness-NOA…
TerryMcGuinness-NOAA Jul 12, 2023
945ea5b
Update globalworkflow-ci.yaml
TerrenceMcGuinness-NOAA Jul 12, 2023
8ca8a1d
Merge pull request #165 from TerrenceMcGuinness-NOAA/selfhosted-Runner
TerrenceMcGuinness-NOAA Jul 12, 2023
acc70d5
Update globalworkflow-ci.yaml
TerrenceMcGuinness-NOAA Jul 12, 2023
6e5d1bf
Update globalworkflow-ci.yaml
TerrenceMcGuinness-NOAA Jul 12, 2023
b34db89
Update globalworkflow-ci.yaml
TerrenceMcGuinness-NOAA Jul 12, 2023
d7d2ef7
Update globalworkflow-ci.yaml
TerrenceMcGuinness-NOAA Jul 12, 2023
0ac6230
replaced PR with run_id because dispatches are not on PRs
TerryMcGuinness-NOAA Jul 12, 2023
2170006
Merge pull request #167 from TerrenceMcGuinness-NOAA/selfhosted-Runner
TerrenceMcGuinness-NOAA Jul 12, 2023
5624145
removed lables for now for dispatch version
TerryMcGuinness-NOAA Jul 12, 2023
3656a48
removed Rocoto utilities as vars as this scripts is not run in cron a…
TerryMcGuinness-NOAA Jul 13, 2023
8562d0a
added BASH wrapper to create_experiment.py for user access from comma…
TerryMcGuinness-NOAA Aug 10, 2023
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
86 changes: 86 additions & 0 deletions .github/workflows/globalworkflow-ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: gw-ci-orion

on: [workflow_dispatch]

# TEST_DIR contains 2 directories;
# 1. HOMEgfs: clone of the global-workflow
# 2. RUNTESTS: A directory containing EXPDIR and COMROT for experiments
# e.g. $> tree ./TEST_DIR
# ./TEST_DIR
# ├── HOMEgfs
# └── RUNTESTS
# ├── COMROT
# │   └── ${pslot}
# └── EXPDIR
# └── ${pslot}
env:
TEST_DIR: ${{ github.workspace }}/${{ github.run_id }}
MACHINE_ID: orion

jobs:
checkout-build-link:
runs-on: [self-hosted, orion-ready]
timeout-minutes: 600

steps:
- name: Checkout global-workflow
uses: actions/checkout@v3
with:
path: ${{ github.run_id }}/HOMEgfs # This path needs to be relative

- name: Checkout components
run: |
cd ${{ env.TEST_DIR }}/HOMEgfs/sorc
./checkout.sh -c -g # Options e.g. -u can be added late

- name: Build components
run: |
cd ${{ env.TEST_DIR }}/HOMEgfs/sorc
./build_all.sh

- name: Link artifacts
run: |
cd ${{ env.TEST_DIR }}/HOMEgfs/sorc
./link_workflow.sh

create-experiments:
needs: checkout-build-link
runs-on: [self-hosted, orion-ready]
strategy:
matrix:
case: ["C48_S2S", "C96_atm3DVar"]

steps:
- name: Create Experiments ${{ matrix.case }}
env:
HOMEgfs_PR: ${{ env.TEST_DIR }}/HOMEgfs
RUNTESTS: ${{ env.TEST_DIR }}/RUNTESTS
pslot: ${{ matrix.case }}.${{ github.run_id }}
run: |
cd ${{ env.TEST_DIR }}/HOMEgfs
source workflow/gw_setup.sh
source ci/platforms/orion.sh
./ci/scripts/create_experiment.py --yaml ci/cases/${{ matrix.case }}.yaml

run-experiments:
needs: create-experiments
runs-on: [self-hosted, orion-ready]
strategy:
max-parallel: 2
matrix:
case: ["C48_S2S", "C96_atm3DVar"]
steps:
- name: Run Experiment ${{ matrix.case }}
run: |
cd ${{ env.TEST_DIR }}/HOMEgfs
./ci/scripts/run-check_ci.sh ${{ env.TEST_DIR }} ${{ matrix.case }}.${{ github.run_id }}

clean-up:
needs: run-experiments
runs-on: [self-hosted, orion-ready]
steps:
- name: Clean-up
run: |
cd ${{ github.workspace }}
rm -rf ${{ github.run_id }}

5 changes: 3 additions & 2 deletions ci/cases/C48_S2S.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ experiment:
mode: forecast-only

arguments:
pslot: ${pslot}
app: S2S
resdet: 48
comrot: ${RUNTESTS}/${pslot}/COMROT
expdir: ${RUNTESTS}/${pslot}/EXPDIR
comrot: ${RUNTESTS}/COMROT
expdir: ${RUNTESTS}/EXPDIR
idate: 2021032312
edate: 2021032312
yaml: ${HOMEgfs_PR}/ci/platforms/gfs_defaults_ci-updates.yaml
17 changes: 0 additions & 17 deletions ci/cases/C96C48_hybatmDA.yaml

This file was deleted.

5 changes: 3 additions & 2 deletions ci/cases/C96_atm3DVar.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ experiment:
mode: cycled

arguments:
pslot: ${pslot}
app: ATM
resdet: 96
comrot: ${RUNTESTS}/${pslot}/COMROT
expdir: ${RUNTESTS}/${pslot}/EXPDIR
comrot: ${RUNTESTS}/COMROT
expdir: ${RUNTESTS}/EXPDIR
icsdir: ${ICSDIR_ROOT}/C96C48
idate: 2021122018
edate: 2021122106
Expand Down
1 change: 1 addition & 0 deletions ci/platforms/orion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ export ICSDIR_ROOT=/work/noaa/global/glopara/data/ICSDIR
export SLURM_ACCOUNT=nems
export max_concurrent_cases=2
export max_concurrent_pr=2
export GH=/home/mterry/bin/gh
17 changes: 8 additions & 9 deletions ci/scripts/check_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ set -eux
# running rocotostat on each to determine if the experiment has
# succeeded or faild. This script is intended
# to run from within a cron job in the CI Managers account
# Abstract TODO
#####################################################################################

HOMEgfs="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." >/dev/null 2>&1 && pwd )"
Expand Down Expand Up @@ -78,11 +77,10 @@ for pr in ${pr_list}; do
if [[ ! -d "${pr_dir}/RUNTESTS" ]]; then
continue
fi
num_cases=$(find "${pr_dir}/RUNTESTS" -mindepth 1 -maxdepth 1 -type d | wc -l) || true

#Check for PR success when ${pr_dir}/RUNTESTS is void of subfolders
#Check for PR success when ${pr_dir}/RUNTESTS/EXPDIR is void of subfolders
# since all successfull ones where previously removed
if [[ "${num_cases}" -eq 0 ]] && [[ -d "${pr_dir}/RUNTESTS" ]]; then
if [[ -z "$(ls -A ${pr_dir}/RUNTESTS/EXPDIR)" ]] ; then
"${GH}" pr edit --repo "${REPO_URL}" "${pr}" --remove-label "CI-${MACHINE_ID^}-Running" --add-label "CI-${MACHINE_ID^}-Passed"
sed -i "s/\`\`\`//2g" "${GFS_CI_ROOT}/PR/${pr}/output_${id}"
"${GH}" pr comment "${pr}" --repo "${REPO_URL}" --body-file "${GFS_CI_ROOT}/PR/${pr}/output_${id}"
Expand All @@ -92,14 +90,14 @@ for pr in ${pr_list}; do
continue
fi

for cases in "${pr_dir}/RUNTESTS/"*; do
for cases in "${pr_dir}/RUNTESTS/EXPDIR/"*; do
pslot=$(basename "${cases}") || true
if [[ -z "${pslot+x}" ]]; then
echo "No cases found in ${pr_dir}/RUNTESTS .. exiting"
echo "No cases found in ${pr_dir}/RUNTESTS/EXPDIR .. exiting"
exit 0
fi
xml="${pr_dir}/RUNTESTS/${pslot}/EXPDIR/${pslot}/${pslot}.xml"
db="${pr_dir}/RUNTESTS/${pslot}/EXPDIR/${pslot}/${pslot}.db"
xml="${pr_dir}/RUNTESTS/EXPDIR/${pslot}/${pslot}.xml"
db="${pr_dir}/RUNTESTS/EXPDIR/${pslot}/${pslot}.db"
if [[ ! -f "${db}" ]]; then
continue
fi
Expand Down Expand Up @@ -138,7 +136,8 @@ for pr in ${pr_list}; do
sed -i "s/\`\`\`//2g" "${GFS_CI_ROOT}/PR/${pr}/output_${id}"
"${GH}" pr comment "${pr}" --repo "${REPO_URL}" --body-file "${GFS_CI_ROOT}/PR/${pr}/output_${id}"
#Remove Experment cases that completed successfully
rm -Rf "${pr_dir}/RUNTESTS/${pslot}"
rm -Rf "${pr_dir}/RUNTESTS/EXPDIR/${pslot}"
rm -Rf "${pr_dir}/RUNTESTS/COMROT/${pslot}"
fi
done
done
4 changes: 3 additions & 1 deletion ci/scripts/clone-build_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ while getopts "p:d:o:h" opt; do
esac
done

mkdir -p "${repodir}"

cd "${repodir}" || exit 1
# clone copy of repo
if [[ -d global-workflow ]]; then
Expand Down Expand Up @@ -78,7 +80,7 @@ echo "${commit}" > "../commit"
# run checkout script
cd sorc || exit 1
set +e
./checkout.sh -c -g -u >> log.checkout 2>&1
./checkout.sh -c -g >> log.checkout 2>&1
checkout_status=$?
if [[ ${checkout_status} != 0 ]]; then
{
Expand Down
92 changes: 34 additions & 58 deletions ci/scripts/create_experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,111 +2,87 @@

"""
Basic python script to create an experiment directory on the fly from a given

yaml file for the arguments to the two scripts below in ${HOMEgfs}/workflow

where ${HOMEgfs} is specified within the input yaml file.

${HOMEgfs}/workflow/setup_expt.py
${HOMEgfs}/workflow/setup_xml.py

The yaml file are simply the arguments for these two scripts.
After this scripts runs these two the use will have an experiment ready for launching
After this scripts runs the experiment is ready for launch.

Output
------

Functionally an experiment is setup as a result running the two scripts described above
with an error code of 0 upon success.
"""

import os
import sys
from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter
from pathlib import Path

from wxflow import YAMLFile, Logger, logit, Executable
from wxflow import YAMLFile, Logger, logit


_here = os.path.dirname(__file__)
_top = os.path.abspath(os.path.join(os.path.abspath(_here), '../..'))
logger = Logger(level='DEBUG', colored_log=True)


# TODO: move create_experiment.py to workflow/ and remove this sys.path.insert business
sys.path.insert(0, os.path.join(_top, 'workflow'))
import setup_expt
import setup_xml


@logit(logger)
def input_args():
"""
Method to collect user arguments for `create_experiment.py`

Input
-----

A single key valued argument: --yaml <full path to YAML file>

Description
-----------

A full path to a YAML file with the following format with required sections: experiment, arguments
Method to collect user arguments for `create_experiment.py`

experiment:
mode: <cycled> <forecast-only>
used to hold the only required positional argument to setup_expt.py
Parameters
----------

arguments:
holds all the remaining key values pairs for all requisite arguments documented for setup_expt.py
Note: the argument pslot is derived from the basename of the yamlfile itself
None

Returns
-------

args: Namespace

Namespace with the value of the file path to a yaml file from the key yaml
argparse.Namespace:
argparse.Namespace with the value of the file path to a yaml file from the key yaml
"""

description = """Single argument as a yaml file containing the
key value pairs as arguments to setup_expt.py
"""
description = """Create a global-workflow experiment"""

parser = ArgumentParser(description=description,
formatter_class=ArgumentDefaultsHelpFormatter)

parser.add_argument('--yaml', help='yaml configuration file per experiment', type=str, required=True)
parser.add_argument('--dir', help='full path to top level of repo of global-workflow', type=str, required=True)
parser.add_argument('--yaml', help='full path to yaml file describing the experiment configuration', type=str, required=True)

args = parser.parse_args()
return args
return parser.parse_args()


if __name__ == '__main__':

user_inputs = input_args()
setup_expt_args = YAMLFile(path=user_inputs.yaml)

HOMEgfs = Path.absolute(Path(user_inputs.dir))
pslot = Path(user_inputs.yaml).stem
type = setup_expt_args.experiment.type
mode = setup_expt_args.experiment.mode

setup_expt_cmd = Executable(Path.joinpath(HOMEgfs, 'workflow', 'setup_expt.py'))

setup_expt_cmd.add_default_arg(type)
setup_expt_cmd.add_default_arg(mode)

for conf, value in setup_expt_args.arguments.items():
setup_expt_cmd.add_default_arg(f'--{conf}')
setup_expt_cmd.add_default_arg(str(value))
testconf = YAMLFile(path=user_inputs.yaml)
experiment_dir = Path.absolute(Path.joinpath(Path(testconf.arguments.expdir), Path(testconf.arguments.pslot)))

setup_expt_cmd.add_default_arg('--pslot')
setup_expt_cmd.add_default_arg(pslot)
# Create a list of arguments to setup_expt.py
setup_expt_args = [testconf.experiment.type, testconf.experiment.mode] # TODO: rename 'type' as 'system' in case.yaml
for kk, vv in testconf.arguments.items():
setup_expt_args.append(f"--{kk}")
setup_expt_args.append(str(vv))

logger.info(f'Run command: {setup_expt_cmd.command}')
setup_expt_stderr = str(Path.joinpath(HOMEgfs, 'ci', 'scripts', 'setup_expt.stderr'))
setup_expt_stdout = str(Path.joinpath(HOMEgfs, 'ci', 'scripts', 'setup_expt.stdout'))
print(setup_expt_stderr)
setup_expt_cmd(output=setup_expt_stdout, error=setup_expt_stderr)
logger.info(f'Call: setup_expt.main()')
setup_expt.main(setup_expt_args)

setup_xml_cmd = Executable(Path.joinpath(HOMEgfs, 'workflow', 'setup_xml.py'))
expdir = Path.absolute(Path.joinpath(Path(setup_expt_args.arguments.expdir), Path(pslot)))
setup_xml_cmd.add_default_arg(str(expdir))
# Create a list of arguments to setup_xml.py
setup_xml_args = [str(experiment_dir)]

logger.info(f'Run command: {setup_xml_cmd.command}')
setup_xml_stderr = str(Path.joinpath(HOMEgfs, 'ci', 'scripts', 'setup_xml.stderr'))
setup_xml_stdout = str(Path.joinpath(HOMEgfs, 'ci', 'scripts', 'setup_xml.stdout'))
setup_xml_cmd(output=setup_xml_stdout, error=setup_xml_stderr)
logger.info(f"Call: setup_xml.main()")
setup_xml.main(setup_xml_args)
Loading