Skip to content

Commit

Permalink
Add el8 tests, move to Apptainer
Browse files Browse the repository at this point in the history
  • Loading branch information
mseidel42 committed Feb 2, 2024
1 parent 7717403 commit da914ce
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 19 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,12 @@ locmap --enable cvmfs
locmap --configure all
```

## Docker
## Singularity/Apptainer

```
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
dnf install docker-ce docker-ce-cli containerd.io docker-compose-plugin
usermod -aG docker runner
Run `cmssw-xxx` commands from `/cvmfs/cms.cern.ch/common`.

systemctl enable --now docker.service
```
dnf install apptainer
```

## Gitlab runner
Expand Down
22 changes: 13 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,18 @@ jobs:
strategy:
matrix:
proc: [hvq]
cmssw_release: [CMSSW_10_6_30, CMSSW_11_0_1, CMSSW_12_3_1]
cmssw_release: [CMSSW_10_6_30, CMSSW_11_0_1, CMSSW_12_3_1, CMSSW_13_0_13, CMSSW_13_3_0]
include:
- cmssw_release: CMSSW_10_6_30
scram_arch: slc7_amd64_gcc700
os: cc7
- cmssw_release: CMSSW_11_0_1
scram_arch: slc7_amd64_gcc820
os: cc7
- cmssw_release: CMSSW_12_3_1
scram_arch: slc7_amd64_gcc10
os: cc7
- cmssw_release: CMSSW_13_0_13
os: el8
- cmssw_release: CMSSW_13_3_0
os: el8
fail-fast: false
# The type of runner that the job will run on
runs-on: [self-hosted, linux, x64]
Expand Down Expand Up @@ -67,20 +71,20 @@ jobs:
max_attempts: 5
timeout_minutes: 60
retry_on_exit_code: 111 # failed CMSSW setup, likely due to cvmfs connectivity
command: 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 }}
command: /cvmfs/cms.cern.ch/common/cmssw-${{ matrix.os }} -- bash bin/Powheg/test/test_build.sh -r ${{ matrix.cmssw_release }} -a ${{ matrix.os }} -p ${{ matrix.proc }}

- name: Check pwg-stat.dat
if: steps.filter.outputs.powheg1 == 'true' || steps.filter.outputs.workflow == 'true'
run: git diff --exit-code bin/Powheg/test/pwg-stat.dat.${{ matrix.proc }}_${{ matrix.scram_arch }}_${{ matrix.cmssw_release }}
run: git diff --exit-code bin/Powheg/test/pwg-stat.dat.${{ matrix.proc }}_${{ matrix.os }}_${{ 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 }}
commit-message: Automated addition ${{ matrix.proc }}_${{ matrix.os }}_${{ matrix.cmssw_release }}
branch: create-pull-request/${{ matrix.proc }}_${{ matrix.os }}_${{ matrix.cmssw_release }}
delete-branch: true
base: master
title: Automated addition ${{ matrix.proc }}_${{ matrix.scram_arch }}_${{ matrix.cmssw_release }}
title: Automated addition ${{ matrix.proc }}_${{ matrix.os }}_${{ 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!
Expand Down
7 changes: 4 additions & 3 deletions bin/Powheg/test/test_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ while getopts r:a:p: flag
do
case "${flag}" in
r) CMSSW_RELEASE=${OPTARG};;
a) SCRAM_ARCH=${OPTARG};;
a) OS=${OPTARG};;
p) PROC=${OPTARG};;
esac
done
Expand All @@ -28,7 +28,7 @@ POWHEG_DIR="$(dirname $(dirname $(realpath $0)))"
BASE_DIR=/tmp/$USER/test_$PROC

echo "CMSSW release: $CMSSW_RELEASE";
echo "Architecture: $SCRAM_ARCH";
echo "OS: $OS";
echo "Test process: $PROC";
echo "Test config: $INPUT"
echo "Base directory: $BASE_DIR"
Expand All @@ -46,10 +46,11 @@ if [ ! -e $CMSSW_RELEASE ]; then
fi
cd $CMSSW_RELEASE/src
eval `/cvmfs/cms.cern.ch/common/scramv1 runtime -sh`
echo "Architecture: $SCRAM_ARCH";
ln -s $POWHEG_DIR/* .
# run Powheg
python3 run_pwg_condor.py -p f -i $INPUT -m $PROC -d 1
cp testProd/pwg-stat.dat test/pwg-stat.dat.${PROC}_${SCRAM_ARCH}_${CMSSW_RELEASE}
cp testProd/pwg-stat.dat test/pwg-stat.dat.${PROC}_${OS}_${CMSSW_RELEASE}

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

0 comments on commit da914ce

Please sign in to comment.