Merge some changes of CROWN_tutorial branch with main #955
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Checks | |
on: | |
workflow_run: | |
workflows: ["build_unittest_container"] | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
# Settings go here! | |
env: | |
BUILD_TYPE: Release | |
ANALYSIS: unittest | |
CONFIG: unittest_config | |
SAMPLES: dyjets | |
ERAS: 2018 | |
SCOPES: "mt,mm,et" | |
SHIFTS: "all" | |
SINGLE_FRIEND_SCOPES: "mt,mm" | |
SINGLE_FRIEND_CONFIG: unittest_friends | |
TWO_FRIENDS_SCOPES: "mt" | |
TWO_FRIENDS_CONFIG: unittest_friends_2 | |
FRIEND_SHIFTS: "nominal,jesUncTotalUp,jesUncTotalDown,tauMuFakeEsDown" | |
jobs: | |
build_project: | |
runs-on: ubuntu-22.04 | |
container: | |
image: ghcr.io/kit-cms/crown-crown-unittest:latest | |
options: --user 0 # run as root | |
steps: | |
- name: Clone project | |
uses: actions/checkout@v3 | |
with: | |
ssh-key: ${{ secrets.CERN_GITLAB_PRIVATE_KEY }} | |
submodules: "recursive" | |
ssh-strict: "false" | |
ssh-known-hosts: "[gitlab.cern.ch]:7999 ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAubVS0czgKaPkC5cfB75CI3XjgWBv7pj2ILiZezVf8okkCAYr+bf4w6VrH2pyv3NRUW5Mm8U/3zoSNcrYIqhFFpz6R62/3xt8hMrPKJKstbt1lSIr8QhEyD24SJEKugMi560BWRPkTzXrrFgxz0X4vuKKytpvihRsccZ7F1JaX76UCWEJ3Xr2BFCEnnN6gj9nvFr4gvSMneunWVLGw2KcHwS1OJfnWBlp3fB0rYWSxZAoVjcjZjvv3hioEftaTapff2PkdQIX//N9Cc555FzdmMzixTvU5j/i+QvjxWVbEBNSKI6te6udC4fYUZMePs2QQnqw9mXUQtaQtw+HV7utuw==" | |
- name: Create Build Environment | |
shell: bash | |
run: cmake -E make_directory ${{github.workspace}}/build | |
- name: adding a system path | |
run: echo "$HOME/.local/bin" >> $GITHUB_PATH | |
- 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 -DONNXRUNTIME_INCLUDE_DIR=/opt/onnxruntime | |
- name: Build | |
shell: bash | |
run: cd ${{github.workspace}}/build && make install -j 2 | |
- name: Test | |
shell: bash | |
run: cd ${{github.workspace}}/build && ctest -V --label-regex "ntuple.*." | |
build_single_friend: | |
runs-on: ubuntu-22.04 | |
container: | |
image: ghcr.io/kit-cms/crown-crown-unittest:latest | |
options: --user 0 # run as root | |
steps: | |
- name: Clone project | |
uses: actions/checkout@v3 | |
with: | |
ssh-key: ${{ secrets.CERN_GITLAB_PRIVATE_KEY }} | |
submodules: "recursive" | |
ssh-strict: "false" | |
ssh-known-hosts: "[gitlab.cern.ch]:7999 ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAubVS0czgKaPkC5cfB75CI3XjgWBv7pj2ILiZezVf8okkCAYr+bf4w6VrH2pyv3NRUW5Mm8U/3zoSNcrYIqhFFpz6R62/3xt8hMrPKJKstbt1lSIr8QhEyD24SJEKugMi560BWRPkTzXrrFgxz0X4vuKKytpvihRsccZ7F1JaX76UCWEJ3Xr2BFCEnnN6gj9nvFr4gvSMneunWVLGw2KcHwS1OJfnWBlp3fB0rYWSxZAoVjcjZjvv3hioEftaTapff2PkdQIX//N9Cc555FzdmMzixTvU5j/i+QvjxWVbEBNSKI6te6udC4fYUZMePs2QQnqw9mXUQtaQtw+HV7utuw==" | |
- name: Create Build Environment | |
shell: bash | |
run: cmake -E make_directory ${{github.workspace}}/build | |
- name: adding a system path | |
run: echo "$HOME/.local/bin" >> $GITHUB_PATH | |
- 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" -DONNXRUNTIME_INCLUDE_DIR=/opt/onnxruntime | |
- name: Build | |
shell: bash | |
run: cd ${{github.workspace}}/build && make install -j 2 | |
- name: Test | |
shell: bash | |
run: cd ${{github.workspace}}/build && ctest -V --label-regex "single_friend.*." | |
build_two_friends: | |
runs-on: ubuntu-22.04 | |
container: | |
image: ghcr.io/kit-cms/crown-crown-unittest:latest | |
options: --user 0 # run as root | |
steps: | |
- name: Clone project | |
uses: actions/checkout@v3 | |
with: | |
ssh-key: ${{ secrets.CERN_GITLAB_PRIVATE_KEY }} | |
submodules: "recursive" | |
ssh-strict: "false" | |
ssh-known-hosts: "[gitlab.cern.ch]:7999 ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAubVS0czgKaPkC5cfB75CI3XjgWBv7pj2ILiZezVf8okkCAYr+bf4w6VrH2pyv3NRUW5Mm8U/3zoSNcrYIqhFFpz6R62/3xt8hMrPKJKstbt1lSIr8QhEyD24SJEKugMi560BWRPkTzXrrFgxz0X4vuKKytpvihRsccZ7F1JaX76UCWEJ3Xr2BFCEnnN6gj9nvFr4gvSMneunWVLGw2KcHwS1OJfnWBlp3fB0rYWSxZAoVjcjZjvv3hioEftaTapff2PkdQIX//N9Cc555FzdmMzixTvU5j/i+QvjxWVbEBNSKI6te6udC4fYUZMePs2QQnqw9mXUQtaQtw+HV7utuw==" | |
- name: Create Build Environment | |
shell: bash | |
run: cmake -E make_directory ${{github.workspace}}/build | |
- name: adding a system path | |
run: echo "$HOME/.local/bin" >> $GITHUB_PATH | |
- 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" -DONNXRUNTIME_INCLUDE_DIR=/opt/onnxruntime | |
- name: Build | |
shell: bash | |
run: cd ${{github.workspace}}/build && make install -j 2 | |
- name: Test | |
shell: bash | |
run: cd ${{github.workspace}}/build && ctest -V --label-regex "two_friends.*." | |
python_format: | |
runs-on: ubuntu-22.04 | |
container: | |
image: ghcr.io/kit-cms/crown-crown-unittest:latest | |
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==23.3.0 | |
- uses: actions/checkout@v2 | |
- name: Check Python formatting | |
shell: bash | |
run: cd $GITHUB_WORKSPACE && bash checks/python-formatting.sh | |
cpp_format: | |
runs-on: ubuntu-22.04 | |
container: | |
image: ghcr.io/kit-cms/crown-crown-unittest:latest | |
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 clang-format | |
- uses: actions/checkout@v2 | |
- name: Check C++ formatting | |
shell: bash | |
run: cd $GITHUB_WORKSPACE && bash checks/cpp-formatting.sh | |
docs: | |
runs-on: ubuntu-22.04 | |
container: | |
image: ghcr.io/kit-cms/crown-crown-unittest:latest | |
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 cmake make doxygen python3-pip | |
- name: install docs related packages | |
run: pip install breathe==4.31 sphinx_rtd_theme==0.5 | |
- uses: actions/checkout@v2 | |
- name: Create Build Environment | |
shell: bash | |
run: cmake -E make_directory ${{github.workspace}}/build | |
- name: Configure CMake | |
shell: bash | |
run: cd ${{github.workspace}}/build && cmake $GITHUB_WORKSPACE/docs | |
- name: Build docs | |
shell: bash | |
run: cd ${{github.workspace}}/build && make | |
- name: Publish | |
shell: bash | |
run: echo "TODO" |