Skip to content
Merged
54 changes: 54 additions & 0 deletions .github/workflows/resultchecks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Result_checks
on:
workflow_run:
workflows: [Software_check]
types: [completed]

jobs:
compare_plots:
runs-on: ubuntu-latest
container:
image: cmscloud/al9-cms:latest
options: --user root
steps:
- name: Checking_out_code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Preparing_packages
run: |
echo "python version="`python3 -V`
ls -la
pwd
dnf install -y root ImageMagick python3-root
echo "ROOT version="`root-config --version`
- name: Python_plots
run: |
source scripts/setup_cmstyle
cd tests
for xfch in test_cmsCanvas test_THStack test_cms2DHisto
do
python3 ${xfch}.py
sha256sum ${xfch}.png
done
- name: Cpp_plots
run: |
source scripts/setup_cmstyle
cd tests
for xfch in test_cmsCanvas test_THStack test_cms2DHisto
do
root -b -q ${xfch}.C
sha256sum ${xfch}_C.png
done
- name: Comparison_of_plots
run: |
cd tests
for xfch in `ls *_C.png`
do
xfch2=`echo ${xfch} | sed s%_C.png%.png%`
echo -n "Comparison of $xfch and $xfch2 yields "
# NCC metric seems to have problems in some recent versions???
# echo `compare -metric NCC $xfch $xfch2 /dev/null`
echo `compare -metric RMSE $xfch $xfch2 /dev/null`
done
#
13 changes: 7 additions & 6 deletions .github/workflows/softwarecheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ jobs:
fetch-depth: 0
- name: Checking_python_3.9
run: |
python3 -V
ls
echo "python version="`python3 -V`
ls -la
pwd
python3 -m py_compile src/cmsstyle/cmsstyle.py
ls -lh src/cmsstyle/__pycache__/
Expand All @@ -27,18 +27,18 @@ jobs:
echo '{gROOT->LoadMacro("cmsstyle.C++");}' > compiling.C

dnf install -y root
echo 'ROOT VERSION='`root-config --version`
echo "ROOT version="`root-config --version`
root -q compiling.C
ls -lh cmsstyle_C.so
#
py2-job:
runs-on: ubuntu-latest

steps:
- name: Checkout repository (on host)
- name: Checkout repository (on host) for python 2.7 check
uses: actions/checkout@v4

- name: Run checks inside container
- name: Run checks inside container for python 2.7 check
uses: addnab/docker-run-action@v3
with:
image: cmscloud/cc7-cms:latest
Expand All @@ -47,4 +47,5 @@ jobs:
python -V
find . -type f
python -m py_compile src/cmsstyle/cmsstyle.py
ls -lh src/cmsstyle/cmsstyle.pyc
ls -lh src/cmsstyle/cmsstyle.pyc
#
Loading