Skip to content

Commit

Permalink
Merge branch 'main' into nmssm_devs
Browse files Browse the repository at this point in the history
Conflicts:
	CMakeLists.txt
	code_generation/analysis_template.cxx
	code_generation/analysis_template_friends.cxx
	include/pairselection.hxx
	include/scalefactors.hxx
	src/pairselection.cxx
	src/scalefactors.cxx
  • Loading branch information
nshadskiy committed Apr 30, 2024
2 parents 7edc9bd + 6f567cb commit fa60e1d
Show file tree
Hide file tree
Showing 53 changed files with 1,571 additions and 692 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/build_unittest_container.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# CI step to build the unittest container to be used for the other CI steps
# publish the container in the github container registry

name: Checks

# This workflow should only run when the Dockerfile changes
on:
push:
paths:
- docker/Dockerfile
pull_request:
paths:
- docker/Dockerfile
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}-crown-unittest

jobs:
build_unittest_container:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push Docker image
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: .
file: docker/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
60 changes: 16 additions & 44 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,12 @@ env:

jobs:
build_project:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
container:
image: rootproject/root:6.28.04-arch
image: ghcr.io/kit-cms/crown-crown-unittest:pr-260
options: --user 0 # run as root

steps:
- name: update Arch keyring
run: pacman -Sc --noconfirm && pacman -Syy --noconfirm && pacman -Sy archlinux-keyring --noconfirm

- name: Install missing software
run: pacman -Syu --noconfirm cmake make git python-pip openmp openmpi boost openssh --ignore root --ignore openssl

- name: Install python packages
run: python -m pip install GitPython --break-system-packages && python -m pip install git+https://github.com/cms-nanoAOD/correctionlib.git --break-system-packages

- name: Clone project
uses: actions/checkout@v3
with:
Expand All @@ -57,7 +48,7 @@ jobs:

- name: Configure CMake
shell: bash
run: cd ${{github.workspace}}/build && cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DANALYSIS=$ANALYSIS -DCONFIG=$CONFIG -DSAMPLES=$SAMPLES -DERAS=$ERAS -DSCOPES=$SCOPES -DSHIFTS=$SHIFTS -DOPTIMIZED=false
run: cd ${{github.workspace}}/build && cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DANALYSIS=$ANALYSIS -DCONFIG=$CONFIG -DSAMPLES=$SAMPLES -DERAS=$ERAS -DSCOPES=$SCOPES -DSHIFTS=$SHIFTS -DOPTIMIZED=false -DONNXRUNTIME_INCLUDE_DIR=/opt/onnxruntime

- name: Build
shell: bash
Expand All @@ -68,21 +59,12 @@ jobs:
run: cd ${{github.workspace}}/build && ctest -V --label-regex "ntuple.*."

build_single_friend:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
container:
image: rootproject/root:6.28.04-arch
image: ghcr.io/kit-cms/crown-crown-unittest:pr-260
options: --user 0 # run as root

steps:
- name: update Arch keyring
run: pacman -Sc --noconfirm && pacman -Syy --noconfirm && pacman -Sy archlinux-keyring --noconfirm

- name: Install missing software
run: pacman -Syu --noconfirm cmake make git python-pip openmp openmpi boost openssh --ignore root --ignore openssl


- name: Install python packages
run: python -m pip install GitPython --break-system-packages && python -m pip install git+https://github.com/cms-nanoAOD/correctionlib.git --break-system-packages

- name: Clone project
uses: actions/checkout@v3
Expand All @@ -101,7 +83,7 @@ jobs:

- name: Configure CMake
shell: bash
run: cd ${{github.workspace}}/build && cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DANALYSIS=$ANALYSIS -DCONFIG=$SINGLE_FRIEND_CONFIG -DSAMPLES=$SAMPLES -DERAS=$ERAS -DSCOPES=$SINGLE_FRIEND_SCOPES -DSHIFTS=$FRIEND_SHIFTS -DOPTIMIZED=false -DQUANTITIESMAP="dummy"
run: cd ${{github.workspace}}/build && cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DANALYSIS=$ANALYSIS -DCONFIG=$SINGLE_FRIEND_CONFIG -DSAMPLES=$SAMPLES -DERAS=$ERAS -DSCOPES=$SINGLE_FRIEND_SCOPES -DSHIFTS=$FRIEND_SHIFTS -DOPTIMIZED=false -DQUANTITIESMAP="dummy" -DONNXRUNTIME_INCLUDE_DIR=/opt/onnxruntime

- name: Build
shell: bash
Expand All @@ -112,22 +94,12 @@ jobs:
run: cd ${{github.workspace}}/build && ctest -V --label-regex "single_friend.*."

build_two_friends:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
container:
image: rootproject/root:6.28.04-arch
image: ghcr.io/kit-cms/crown-crown-unittest:pr-260
options: --user 0 # run as root

steps:
- name: update Arch keyring
run: pacman -Sc --noconfirm && pacman -Syy --noconfirm && pacman -Sy archlinux-keyring --noconfirm

- name: Install missing software
run: pacman -Syu --noconfirm cmake make git python-pip openmp openmpi boost openssh --ignore root --ignore openssl


- name: Install python packages
run: python -m pip install GitPython --break-system-packages && python -m pip install git+https://github.com/cms-nanoAOD/correctionlib.git --break-system-packages

- name: Clone project
uses: actions/checkout@v3
with:
Expand All @@ -145,7 +117,7 @@ jobs:

- name: Configure CMake
shell: bash
run: cd ${{github.workspace}}/build && cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DANALYSIS=$ANALYSIS -DCONFIG=$TWO_FRIENDS_CONFIG -DSAMPLES=$SAMPLES -DERAS=$ERAS -DSCOPES=$TWO_FRIENDS_SCOPES -DSHIFTS=$FRIEND_SHIFTS -DOPTIMIZED=false -DQUANTITIESMAP="dummy"
run: cd ${{github.workspace}}/build && cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DANALYSIS=$ANALYSIS -DCONFIG=$TWO_FRIENDS_CONFIG -DSAMPLES=$SAMPLES -DERAS=$ERAS -DSCOPES=$TWO_FRIENDS_SCOPES -DSHIFTS=$FRIEND_SHIFTS -DOPTIMIZED=false -DQUANTITIESMAP="dummy" -DONNXRUNTIME_INCLUDE_DIR=/opt/onnxruntime

- name: Build
shell: bash
Expand All @@ -157,17 +129,17 @@ jobs:


python_format:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
container:
image: rootproject/root:6.26.00-ubuntu20.04
image: ghcr.io/kit-cms/crown-crown-unittest:pr-260
options: --user 0 # run as root

steps:
- name: apt update
run: apt-get -y update

- name: Install missing software
run: apt-get install -y git python3-pip && pip install black
run: apt-get install -y git python3-pip && pip install black==23.3.0

- uses: actions/checkout@v2

Expand All @@ -176,9 +148,9 @@ jobs:
run: cd $GITHUB_WORKSPACE && bash checks/python-formatting.sh

cpp_format:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
container:
image: rootproject/root:6.26.00-ubuntu20.04
image: ghcr.io/kit-cms/crown-crown-unittest:pr-260
options: --user 0 # run as root

steps:
Expand All @@ -195,9 +167,9 @@ jobs:
run: cd $GITHUB_WORKSPACE && bash checks/cpp-formatting.sh

docs:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
container:
image: rootproject/root:6.26.00-ubuntu20.04
image: ghcr.io/kit-cms/crown-crown-unittest:pr-260
options: --user 0 # run as root

steps:
Expand Down
8 changes: 7 additions & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,18 @@
# Required
version: 2

# Set the OS, Python version and other tools you might need

build:
os: ubuntu-22.04
tools:
python: "3.10"

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/sphinx_source/conf.py

# Optionally set the version of Python and requirements required to build your docs
python:
version: 3.8
install:
- requirements: docs/sphinx_source/requirements.txt
Loading

0 comments on commit fa60e1d

Please sign in to comment.