Skip to content

Commit

Permalink
feat : restructure ci & fix dataset name
Browse files Browse the repository at this point in the history
- metadata: fix dataset name
- ci: restructure CI, trigger files related to CI
- ci: parallize ci
  • Loading branch information
Ming-Yan committed Oct 10, 2023
1 parent bf92deb commit 4c1aa43
Show file tree
Hide file tree
Showing 19 changed files with 500 additions and 60 deletions.
20 changes: 17 additions & 3 deletions .github/workflows/BTA_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,25 @@ jobs:
run: |
pip install -e .
bta_summer22:
needs: [build]
runs-on: ubuntu-latest
defaults:
run:
shell: "bash -l {0}"
steps:
- name: BTA workflow test
run: |
python runner.py --wf BTA --json metadata/test_bta_run3.json --campaign Summer22Run3 --executor iterative --overwrite
python runner.py --wf BTA --json metadata/test_bta_run3.json --campaign Summer22Run3 --executor iterative --overwrite
bta_tt_summer22:
needs: [build]
runs-on: ubuntu-latest
defaults:
run:
shell: "bash -l {0}"
steps:
- name: BTA_ttbar workflow test
run: |
python runner.py --wf BTA_ttbar --json metadata/test_bta_run3.json --campaign Summer22Run3 --executor iterative --overwrite
python runner.py --wf BTA_ttbar --json metadata/test_bta_run3.json --campaign Summer22Run3 --executor iterative --overwrite
31 changes: 25 additions & 6 deletions .github/workflows/ctag_DY_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,31 @@ jobs:
run: |
pip install -e .

- name: ctag muon DY workflows with correctionlib
ctag_mu_DY_summer22:
needs: [build]
runs-on: ubuntu-latest
defaults:
run:
shell: "bash -l {0}"
steps:
- name: ctag muon DY workflows with arrays
run: |
python runner.py --workflow ctag_DY_sf --json metadata/test_bta_run3.json --limit 1 --executor iterative --campaign Summer22Run3 --isArray --overwrite
- name: ctag muon DY workflows with systematics
run: |
python runner.py --workflow ctag_DY_sf --json metadata/test_bta_run3.json --limit 1 --executor iterative --campaign Summer22Run3 --isSyst all --isArray --year 2022 --overwrite
python runner.py --workflow ctag_DY_sf --json metadata/test_bta_run3.json --limit 1 --executor iterative --campaign Summer22Run3 --isSyst all --overwrite

- name: ctag electron DY workflows with correctionlib
ctag_ele_DY_summer22:
needs: [build]
runs-on: ubuntu-latest
defaults:
run:
shell: "bash -l {0}"
steps:
- name: ctag electron DY workflows with arrays
run: |
python runner.py --workflow ectag_DY_sf --json metadata/test_bta_run3.json --limit 1 --executor iterative --campaign Summer22Run3 --isArray --overwrite
- name: ctag muon DY workflows with systematics
run: |
python runner.py --workflow ectag_DY_sf --json metadata/test_bta_run3.json --limit 1 --executor iterative --campaign Summer22Run3 --isSyst all --isArray --year 2022 --overwrite
python runner.py --workflow ectag_DY_sf --json metadata/test_bta_run3.json --limit 1 --executor iterative --campaign Summer22Run3 --isSyst all --overwrite
32 changes: 26 additions & 6 deletions .github/workflows/ctag_Wc_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,31 @@ jobs:
run: |
pip install -e .

- name: ctag muon W+c workflows with correctionlib
ctag_mu_Wc_summer22:
needs: [build]
runs-on: ubuntu-latest
defaults:
run:
shell: "bash -l {0}"
steps:
- name: ctag muon W+c workflows with arrays
run: |
python runner.py --workflow ctag_Wc_sf --json metadata/test_bta_run3.json --limit 1 --executor iterative --campaign Summer22Run3 --isSyst all --isArray --overwrite
- name: ctag electron W+c workflows with correctionlib
python runner.py --workflow ctag_Wc_sf --json metadata/test_bta_run3.json --limit 1 --executor iterative --campaign Summer22Run3 --isArray --overwrite
- name: ctag muon W+c workflows with systematics
run: |
python runner.py --workflow ctag_Wc_sf --json metadata/test_bta_run3.json --limit 1 --executor iterative --campaign Summer22Run3 --isSyst all --overwrite
ctag_ele_Wc_summer22:
needs: [build]
runs-on: ubuntu-latest
defaults:
run:
shell: "bash -l {0}"
steps:
- name: ctag electron W+c workflows with arrays
run: |
python runner.py --workflow ectag_Wc_sf --json metadata/test_bta_run3.json --limit 1 --executor iterative --campaign Summer22Run3 --isArray --overwrite
- name: ctag electron W+c workflows with systematics
run: |
python runner.py --workflow ectag_Wc_sf --json metadata/test_bta_run3.json --limit 1 --executor iterative --campaign Summer22Run3 --isSyst all --isArray --overwrite
python runner.py --workflow ectag_Wc_sf --json metadata/test_bta_run3.json --limit 1 --executor iterative --campaign Summer22Run3 --isSyst all --overwrite

148 changes: 148 additions & 0 deletions .github/workflows/summer22EE_workflow.yml.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
name: Summer22EE_workflows

on:
push:
branches: [ master ]
paths:
- 'src/BTVNanoCommissioning/helpers/*'
- 'src/BTVNanoCommissioning/utils/*'
- 'src/BTVNanoCommissioning/*ttdilep*'
- '.github/workflows/summer22EE_workflow.yml'
pull_request_target:
branches: [ master ]
workflow_dispatch:

jobs:
build:
name : build
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: ["3.8","3.10"]

defaults:
run:
shell: "bash -l {0}"

steps:
- uses: actions/checkout@v2
- name: update submodules
env:
SSHKEY: ${{ secrets.GIT_CERN_SSH_PRIVATE }}
run: |
mkdir $HOME/.ssh
echo "$SSHKEY" > $HOME/.ssh/id_rsa
chmod 600 $HOME/.ssh/id_rsa
echo "HOST *" > ~/.ssh/config
echo "StrictHostKeyChecking no" >> ~/.ssh/config
git submodule update --init --recursive
- uses: cvmfs-contrib/github-action-cvmfs@v2
with:
cvmfs_repositories: 'grid.cern.ch'

- name: Set conda environment
uses: conda-incubator/setup-miniconda@v2
with:
python-version: ${{ matrix.python-version }}
miniforge-variant: Mambaforge
channels: conda-forge,defaults
channel-priority: true
activate-environment: btv_coffea
environment-file: test_env.yml
auto-activate-base: false

- name: Verify environment
run: |
conda info
conda env list
conda list
- name: Set up proxy
# https://awesome-workshop.github.io/gitlab-cms/03-vomsproxy/index.html
# continue-on-error: true
env:
# To genereate secrets use (strip all \n)
# base64 -i ~/.globus/usercert.pem | awk NF=NF RS= OFS=
# base64 -i ~/.globus/userkey.pem | awk NF=NF RS= OFS=
# Cross check roundtrip by adding ``| base64 -d `` and see if same as input
GRID_USERKEY: ${{ secrets.GRID_USERKEY }}
GRID_USERCERT: ${{ secrets.GRID_USERCERT }}
# Read automatically by voms-proxy-init
X509_VOMS_DIR: /cvmfs/grid.cern.ch/etc/grid-security/vomsdir/
X509_VOMSES: /cvmfs/grid.cern.ch/etc/grid-security/vomses/
X509_DEFAULT_USER_CERT: $HOME/.globus/usercert.pem
X509_DEFAULT_USER_KEY: $HOME/.globus/userkey.pem
run: |
mkdir $HOME/.globus
printf $GRID_USERKEY | base64 -d > $HOME/.globus/userkey.pem
printf $GRID_USERCERT | base64 -d > $HOME/.globus/usercert.pem
# DEBUG: dump decoded cert, cert is public, but don't dump key!
# base64 -i $HOME/.globus/usercert.pem
chmod 400 $HOME/.globus/userkey.pem
openssl rand -out $HOME/.rnd -hex 256
printf "${{secrets.GRID_PASSWORD}}" | voms-proxy-init --voms cms --vomses ${X509_VOMSES} --debug --pwstdin
- name: Test xrootd
run: |
xrdcp root://eoscms.cern.ch//eos/cms/store/group/phys_btag/nano-commissioning/test_w_dj.root .
- name: Install Repo
run: |
pip install -e .
btag_mu_ttdilep_summer22EE:
needs: [build]
runs-on: ubuntu-latest
defaults:
run:
shell: "bash -l {0}"
steps:
- name: btag dileptonic ttbar workflows with arrays
run: |
python runner.py --workflow ttdilep_sf --json metadata/test_bta_run3EE.json --limit 1 --executor iterative --campaign Summer22EERun3 --isArray --overwrite
- name: btag dileptonic ttbar workflows with systematics
run: |
python runner.py --workflow ttdilep_sf --json metadata/test_bta_run3EE.json --limit 1 --executor iterative --campaign Summer22EERun3 --isSyst all --overwrite
btag_mu_ttsemi_summer22EE:
needs: [build]
runs-on: ubuntu-latest
defaults:
run:
shell: "bash -l {0}"
steps:
- name: btag semileptonic ttbar workflows with array
run: |
python runner.py --workflow ttsemilep_sf --json metadata/test_bta_run3EE.json --limit 1 --executor iterative --campaign SummerEE22Run3 --isArray --overwrite --year 2022
- name: btag semileptonic ttbar workflows with systematics
run: |
python runner.py --workflow ttsemilep_sf --json metadata/test_bta_run3EE.json --limit 1 --executor iterative --campaign SummerEE22Run3 --isSyst all --overwrite --year 2022
ctag_mu_Wc_summer22EE:
needs: [build]
runs-on: ubuntu-latest
defaults:
run:
shell: "bash -l {0}"
steps:
- name: ctag muon W+c workflows with arrays
run: |
python runner.py --workflow ctag_Wc_sf --json metadata/test_bta_run3EE.json --limit 1 --executor iterative --campaign Summer22EERun3 --isArray --overwrite
- name: ctag muon W+c workflows with systematics
run: |
python runner.py --workflow ctag_Wc_sf --json metadata/test_bta_run3EE.json --limit 1 --executor iterative --campaign Summer22EERun3 --isSyst all --overwrite
ctag_mu_DY_summer22EE:
needs: [build]
runs-on: ubuntu-latest
defaults:
run:
shell: "bash -l {0}"
steps:
- name: ctag muon DY workflows with arrays
run: |
python runner.py --workflow ctag_DY_sf --json metadata/test_bta_run3EE.json --limit 1 --executor iterative --campaign Summer22EERun3 --isArray --overwrite
- name: ctag muon DY workflows with systematics
run: |
python runner.py --workflow ctag_DY_sf --json metadata/test_bta_run3EE.json --limit 1 --executor iterative --campaign Summer22EERun3 --isSyst all --overwrite
Loading

0 comments on commit 4c1aa43

Please sign in to comment.