Skip to content

Commit

Permalink
Update CI
Browse files Browse the repository at this point in the history
  • Loading branch information
dustinswales committed Jun 10, 2024
1 parent 4fadbf2 commit 2d70f8d
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/ci_plt_scm_rts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
- name: Plot SCM regression test baselines.
run: |
cd ${SCM_ROOT}/test
./cmp_scmout.py --dir_rt ${dir_bl}
./plt_scm_bl.py --dir_bl ${dir_bl}
- name: Upload plots of SCM baselines as GitHub Artifact.
uses: actions/upload-artifact@v2
Expand Down
54 changes: 54 additions & 0 deletions test/plt_scm_bl.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#!/usr/bin/env python

##############################################################################
#
# This script creates plots of the SCM RT baselines.
#
##############################################################################
import os
import sys
from rt_test_cases import run_list
from os.path import exists
import argparse
from plot_scm_out import plot_results

#
parser = argparse.ArgumentParser()
parser.add_argument('-drt', '--dir_bl', help='Directory containing SCM baselines', required=True)

#
def parse_args():
args = parser.parse_args()
dir_bl = args.dir_bl
return (dir_bl)

#
def main():
#
(dir_bl) = parse_args()

#
error_count = 0
for run in run_list:
file_bl = dir_bl + "/" + run["case"]+"_"+run["suite"]+"/output.nc"
if exists(file_bl):
plot_files = plot_results(file_bl)

# Setup output directories for plots.
result = os.system("mkdir -p scm_bl_out/"+run["case"]+"/"+run["suite"])

# Archive plots.
com = "mv"
for plot_file in plot_files:
com = com + " " + plot_file
# end for
com = com + " scm_bl_out/" + run["case"] + "/" + run["suite"]
result = os.system(com)
# end if

# Create tarball with plots.
result = os.system('tar -cvf scm_bl_plots.tar scm_bl_out/*')

#
if __name__ == '__main__':
main()

0 comments on commit 2d70f8d

Please sign in to comment.