Homework
Overview
Teaching: 0 min
Exercises: 30 minQuestions
Where to go next?
Want some homework?
Objectives
Add more testing, perhaps to statistics.
Like the last section, I will simply explain what you need to do. After the previous section, you should have the following in .github/workflows/main.yml
:
jobs:
build_skim:
runs-on: ubuntu-latest
container: rootproject/root:6.26.10-conda
steps:
- name: checkout repository
uses: actions/checkout@v4
- name: build
run: |
COMPILER=$(root-config --cxx)
FLAGS=$(root-config --cflags --libs)
$COMPILER -g -O3 -Wall -Wextra -Wpedantic -o skim skim.cxx $FLAGS
- uses: actions/upload-artifact@v4
with:
name: skim6.26.10
path: skim
skim:
needs: build_skim
runs-on: ubuntu-latest
container: rootproject/root:6.26.10-conda
steps:
- name: checkout repository
uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: skim6.26.10
- name: skim
run: |
chmod +x ./skim
./skim root://eospublic.cern.ch//eos/root-eos/HiggsTauTauReduced/GluGluToHToTauTau.root skim_ggH.root 19.6 11467.0 0.1 > skim_ggH.log
- uses: actions/upload-artifact@v4
with:
name: skim_ggH
path: |
skim_ggH.root
skim_ggH.log
plot:
needs: skim
runs-on: ubuntu-latest
container: rootproject/root:6.26.10-conda
steps:
- name: checkout repository
uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: skim_ggH
- name: plot
run: python histograms.py skim_ggH.root ggH hist_ggH.root
- uses: actions/upload-artifact@v4
with:
name: histograms
path: hist_ggH.root
test:
needs: plot
runs-on: ubuntu-latest
container: rootproject/root:6.26.10-conda
steps:
- name: checkout repository
uses: actions/checkout@v4
- name: Download from skim
uses: actions/download-artifact@v4
with:
name: skim_ggH
- name: Download from plot
uses: actions/download-artifact@v4
with:
name: histograms
- name: cutflow test
run: python tests/test_cutflow_ggH.py
- name: plot test
run: python tests/test_plot_ggH.py
In your virtual-pipelines-eventselection
repository, you need to:
- Add more tests
- Go wild!
Key Points
Use everything you’ve learned to write your own CI/CD!