Skip to content

Commit

Permalink
Test multiple CMSSW releases
Browse files Browse the repository at this point in the history
  • Loading branch information
mseidel42 committed May 28, 2022
1 parent 5784e58 commit 58421c3
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 6 deletions.
28 changes: 26 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,18 @@ on:
jobs:
# This workflow contains a single job called "build"
powheg:
strategy:
matrix:
proc: [hvq]
cmssw_release: [CMSSW_10_6_30, CMSSW_11_0_1, CMSSW_12_3_1]
include:
- cmssw_release: CMSSW_10_6_30
scram_arch: slc7_amd64_gcc700
- cmssw_release: CMSSW_11_0_1
scram_arch: slc7_amd64_gcc820
- cmssw_release: CMSSW_12_3_1
scram_arch: slc7_amd64_gcc10
fail-fast: false
# The type of runner that the job will run on
runs-on: [self-hosted, linux, x64]

Expand All @@ -26,7 +38,19 @@ jobs:
- uses: actions/checkout@v3

- name: Build gridpack
run: docker run --rm -v /cvmfs:/cvmfs -v $PWD:$PWD -w $PWD gitlab-registry.cern.ch/cms-cloud/cmssw-docker/cc7-cms bash bin/Powheg/test/test_build.sh -r CMSSW_11_0_1 -p hvq
run: docker run --rm -v /cvmfs:/cvmfs -v $PWD:$PWD -w $PWD gitlab-registry.cern.ch/cms-cloud/cmssw-docker/cc7-cms bash bin/Powheg/test/test_build.sh -r ${{ matrix.cmssw_release }} -a ${{ matrix.scram_arch }} -p ${{ matrix.proc }}

- name: Check pwg-stat.dat
run: git diff --exit-code bin/Powheg/test/pwg-stat.dat.hvq
run: git diff --exit-code bin/Powheg/test/pwg-stat.dat.${{ matrix.proc }}_${{ matrix.scram_arch }}_${{ matrix.cmssw_release }}

- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
commit-message: Automated addition ${{ matrix.proc }}_${{ matrix.scram_arch }}_${{ matrix.cmssw_release }}
branch: create-pull-request/${{ matrix.proc }}_${{ matrix.scram_arch }}_${{ matrix.cmssw_release }}
delete-branch: true
base: master
title: Automated addition ${{ matrix.proc }}_${{ matrix.scram_arch }}_${{ matrix.cmssw_release }}
body: |
Automated addition by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action.
Please review the cross section file carefully!
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
*.pyc
__init__.py
additional.condorConf
16 changes: 12 additions & 4 deletions bin/Powheg/test/test_build.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#!/bin/bash

while getopts r:p: flag
while getopts r:a:p: flag
do
case "${flag}" in
r) CMSSW_RELEASE=${OPTARG};;
a) SCRAM_ARCH=${OPTARG};;
p) PROC=${OPTARG};;
esac
done
Expand All @@ -27,6 +28,7 @@ POWHEG_DIR="$(dirname $(dirname $(realpath $0)))"
BASE_DIR=/tmp/$USER/test_$PROC

echo "CMSSW release: $CMSSW_RELEASE";
echo "Architecture: $SCRAM_ARCH";
echo "Test process: $PROC";
echo "Test config: $INPUT"
echo "Base directory: $BASE_DIR"
Expand All @@ -39,15 +41,21 @@ cd $BASE_DIR
source /cvmfs/cms.cern.ch/cmsset_default.sh
/cvmfs/cms.cern.ch/common/scramv1 project CMSSW $CMSSW_RELEASE
if [ ! -e $CMSSW_RELEASE ]; then
echo "Error: no CMSSW area"
exit 1
echo "Error: no CMSSW area, wait a little to recover CVMFS issue"
sleep 10
source /cvmfs/cms.cern.ch/cmsset_default.sh
/cvmfs/cms.cern.ch/common/scramv1 project CMSSW $CMSSW_RELEASE
if [ ! -e $CMSSW_RELEASE ]; then
echo "Error: no CMSSW area, aborting"
exit 1
fi
fi
cd $CMSSW_RELEASE/src
eval `/cvmfs/cms.cern.ch/common/scramv1 runtime -sh`
ln -s $POWHEG_DIR/* .
# run Powheg
python run_pwg_condor.py -p f -i $INPUT -m $PROC -d 1
cp testProd/pwg-stat.dat test/pwg-stat.dat.$PROC
cp testProd/pwg-stat.dat test/pwg-stat.dat.${PROC}_${SCRAM_ARCH}_${CMSSW_RELEASE}

GRIDPACK=${PROC}_${SCRAM_ARCH}_${CMSSW_RELEASE}_testProd.tgz
if [ ! -f $GRIDPACK ]; then
Expand Down

0 comments on commit 58421c3

Please sign in to comment.