-
Notifications
You must be signed in to change notification settings - Fork 22
203 lines (159 loc) · 7.05 KB
/
checks.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
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"