-
Notifications
You must be signed in to change notification settings - Fork 2
293 lines (281 loc) · 12.7 KB
/
validation.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
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
name: Validation
on:
workflow_dispatch:
workflow_call:
env:
CMAKE_BUILD_TYPE: Release
REST_PATH: /rest/axionlib/install
AXION_LIB_PATH: axionlib
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
defaults:
run:
shell: bash
jobs:
libCheck:
name: Validate library
runs-on: ubuntu-latest
container:
image: ghcr.io/lobis/root-geant4-garfield:rest-for-physics
steps:
- uses: rest-for-physics/framework/.github/actions/checkout@master
with:
branch: ${{ env.BRANCH_NAME }}
repository: rest-for-physics/axionlib
path: ${{ env.AXION_LIB_PATH }}
- run: python3 ${{ env.AXION_LIB_PATH }}/pipeline/validateLibrary.py .
precommit-config:
name: Validate pre-commit config
runs-on: ubuntu-latest
container:
image: ghcr.io/lobis/root-geant4-garfield:rest-for-physics
steps:
- name: Checkout axionlib
uses: rest-for-physics/framework/.github/actions/checkout@master
with:
branch: ${{ env.BRANCH_NAME }}
repository: rest-for-physics/axionlib
path: ${{ env.AXION_LIB_PATH }}
- name: Verify pre-commit config files match
run: |
cd ${{ env.AXION_LIB_PATH }}
curl https://raw.githubusercontent.com/rest-for-physics/framework/master/scripts/validatePreCommitConfig.py | python
build-axionlib:
name: Build only axionlib
runs-on: ubuntu-latest
container:
image: ghcr.io/lobis/root-geant4-garfield:rest-for-physics
steps:
- name: Build and install
uses: rest-for-physics/framework/.github/actions/build@master
with:
cmake-flags: "-DCMAKE_INSTALL_PREFIX=${{ env.REST_PATH }} -DCMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }} -DREST_WELCOME=ON -DRESTLIB_AXION=ON -DREST_MPFR=ON"
branch: ${{ env.BRANCH_NAME }}
- name: Cache framework installation
id: axionlib-install-cache
uses: actions/cache@v3
with:
key: ${{ env.BRANCH_NAME }}-${{ github.sha }}
path: ${{ env.REST_PATH }}
macros-health:
name: "Macros with clean error output"
runs-on: ubuntu-latest
container:
image: ghcr.io/lobis/root-geant4-garfield:rest-for-physics
needs: [ build-axionlib ]
steps:
- uses: rest-for-physics/framework/.github/actions/checkout@master
with:
branch: ${{ env.BRANCH_NAME }}
repository: rest-for-physics/axionlib
path: ${{ env.AXION_LIB_PATH }}
- name: Restore cache
uses: actions/cache@v3
id: axionlib-install-cache
with:
key: ${{ env.BRANCH_NAME }}-${{ github.sha }}
path: ${{ env.REST_PATH }}
- name: Load restRootMacros in axiolib standalone
run: |
source ${{ env.REST_PATH }}/thisREST.sh
cd ${{ env.AXION_LIB_PATH }}/pipeline
export DISPLAY=localhost:0.0
echo "Running validation script"
python3 validateMacros.py
Physics:
name: Check physics
runs-on: ubuntu-latest
container:
image: ghcr.io/lobis/root-geant4-garfield:rest-for-physics
needs: [ build-axionlib ]
steps:
- uses: rest-for-physics/framework/.github/actions/checkout@master
with:
branch: ${{ env.BRANCH_NAME }}
repository: rest-for-physics/axionlib
path: ${{ env.AXION_LIB_PATH }}
- name: Restore cache
uses: actions/cache@v3
id: axionlib-install-cache
with:
key: ${{ env.BRANCH_NAME }}-${{ github.sha }}
path: ${{ env.REST_PATH }}
- name: Basic physics tests
run: |
source ${{ env.REST_PATH }}/thisREST.sh
cd ${{ env.AXION_LIB_PATH }}/pipeline/physics/
wget https://rest-for-physics.github.io/axionlib-data/bufferGas/He.abs
wget https://rest-for-physics.github.io/axionlib-data/bufferGas/He.nff
wget https://rest-for-physics.github.io/axionlib-data/bufferGas/Ne.abs
wget https://rest-for-physics.github.io/axionlib-data/bufferGas/Ne.nff
wget https://rest-for-physics.github.io/axionlib-data/bufferGas/bufferGases.rml
wget https://rest-for-physics.github.io/axionlib-data/magneticField/fields.rml
wget https://rest-for-physics.github.io/axionlib-data/magneticField/Bykovskiy_201906.dat
restRoot -b -q AxionPhysicsValidation.C
Metadata:
name: Check metadata
runs-on: ubuntu-latest
container:
image: ghcr.io/lobis/root-geant4-garfield:rest-for-physics
needs: [ build-axionlib ]
steps:
- uses: rest-for-physics/framework/.github/actions/checkout@master
with:
branch: ${{ env.BRANCH_NAME }}
repository: rest-for-physics/axionlib
path: ${{ env.AXION_LIB_PATH }}
- name: Restore cache
uses: actions/cache@v3
id: axionlib-install-cache
with:
key: ${{ env.BRANCH_NAME }}-${{ github.sha }}
path: ${{ env.REST_PATH }}
- name: Magnetic field
run: |
source ${{ env.REST_PATH }}/thisREST.sh
cd ${{ env.AXION_LIB_PATH }}/pipeline/metadata/magneticField/
wget https://rest-for-physics.github.io/axionlib-data/magneticField/fields.rml
wget https://rest-for-physics.github.io/axionlib-data/magneticField/Bykovskiy_201906.dat
python magneticField.py
cd trilinear
wget https://rest-for-physics.github.io/axionlib-data/magneticField/fields.rml
restRoot -b -q GetMagneticField_test.C
cd ../boundary/
restRoot -b -q Boundaries_test.C
- name: Optics Mirrors
run: |
source ${{ env.REST_PATH }}/thisREST.sh
cd ${{ env.AXION_LIB_PATH }}/pipeline/metadata/optics/
wget https://rest-for-physics.github.io/axionlib-data/optics/optics.rml
wget https://rest-for-physics.github.io/axionlib-data/opticsMirror/mirrors.rml
wget https://rest-for-physics.github.io/axionlib-data/opticsMirror/Reflectivity_Single_C_30_SiO2_0.N901f
wget https://rest-for-physics.github.io/axionlib-data/opticsMirror/Transmission_Single_C_30_SiO2_0.N901f
wget https://rest-for-physics.github.io/axionlib-data/opticsMirror/Reflectivity_Single_Au_250_Ni_0.4.N901f
wget https://rest-for-physics.github.io/axionlib-data/opticsMirror/Transmission_Single_Au_250_Ni_0.4.N901f
python mirrors.py
- name: MCPL Optics
run: |
source ${{ env.REST_PATH }}/thisREST.sh
cd ${{ env.AXION_LIB_PATH }}/pipeline/metadata/optics/
wget https://rest-for-physics.github.io/axionlib-data/optics/optics.rml
python mcpl.py
- name: X-ray transmission
run: |
source ${{ env.REST_PATH }}/thisREST.sh
cd ${{ env.AXION_LIB_PATH }}/pipeline/metadata/transmission/
wget https://rest-for-physics.github.io/axionlib-data/transmission/windows.rml
wget https://rest-for-physics.github.io/axionlib-data/transmission/Al.sol
wget https://rest-for-physics.github.io/axionlib-data/transmission/Si.sol
wget https://rest-for-physics.github.io/axionlib-data/transmission/Si3N4.sol
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${{ env.REST_PATH }}/mpfr-4.0.2/install/lib
python windowPlot.py
- name: Solar flux
run: |
source ${{ env.REST_PATH }}/thisREST.sh
cd ${{ env.AXION_LIB_PATH }}/pipeline/metadata/solarFlux/
wget https://rest-for-physics.github.io/axionlib-data/solarFlux/fluxes.rml
wget https://rest-for-physics.github.io/axionlib-data/solarFlux/Dummy_Galan_202202.spt
wget https://rest-for-physics.github.io/axionlib-data/solarFlux/Primakoff_Gianotti_201904.dat
wget https://rest-for-physics.github.io/axionlib-data/solarFlux/Primakoff_LennertHoof_202203.dat
python solarTests.py
python solarPlotQCD.py
python compare.py
Ray-tracing:
name: Check ray-tracing processing chain
runs-on: ubuntu-latest
container:
image: ghcr.io/lobis/root-geant4-garfield:rest-for-physics
needs: [ build-axionlib ]
steps:
- uses: rest-for-physics/framework/.github/actions/checkout@master
with:
branch: ${{ env.BRANCH_NAME }}
repository: rest-for-physics/axionlib
path: ${{ env.AXION_LIB_PATH }}
- name: Restore cache
uses: actions/cache@v3
id: axionlib-install-cache
with:
key: ${{ env.BRANCH_NAME }}-${{ github.sha }}
path: ${{ env.REST_PATH }}
- name: XMM optics bench ray-tracing
run: |
source ${{ env.REST_PATH }}/thisREST.sh
export REST_NEVENTS=1000
export REST_RUN=100
cd ${{ env.AXION_LIB_PATH }}/pipeline/ray-tracing/optics/
wget https://rest-for-physics.github.io/axionlib-data/optics/xmm.rml
wget https://rest-for-physics.github.io/axionlib-data/optics/XMM.Wolter
wget https://rest-for-physics.github.io/axionlib-data/opticsMirror/Reflectivity_Single_Au_250_Ni_0.4.N901f
wget https://rest-for-physics.github.io/axionlib-data/opticsMirror/Transmission_Single_Au_250_Ni_0.4.N901f
restManager --c opticsBench.rml
restRoot -b -q ValidateXMM.C'("OpticsBench_Yaw_0.05_Dev_0.005_BabyIAXO_Run00100.root")'
- name: Window transmission
run: |
source ${{ env.REST_PATH }}/thisREST.sh
cd ${{ env.AXION_LIB_PATH }}/pipeline/ray-tracing/transmission/
wget https://rest-for-physics.github.io/axionlib-data/transmission/Si.sol
restManager --c emptyWindow.rml
restRoot ValidateTransmission.C'("EmptyVacuumWindow.root", 0.07, 0.09)'
restManager --c shiftedWindow.rml
restRoot ValidateTransmission.C'("ShiftedVacuumWindow", 0.3, 0.5)'
restManager --c siWindow.rml
restRoot -b -q ValidateTransmission.C'("SiWindow.root", 0.9, 1)'
- name: Axion-field integration
run: |
source ${{ env.REST_PATH }}/thisREST.sh
cd ${{ env.AXION_LIB_PATH }}/pipeline/ray-tracing/axion-field/
wget https://rest-for-physics.github.io/axionlib-data/magneticField/fields.rml
wget https://rest-for-physics.github.io/axionlib-data/magneticField/Bykovskiy_201906.dat
wget https://rest-for-physics.github.io/axionlib-data/bufferGas/He.abs
wget https://rest-for-physics.github.io/axionlib-data/bufferGas/He.nff
wget https://rest-for-physics.github.io/axionlib-data/bufferGas/bufferGases.rml
restManager --c photonConversion.rml
restRoot -b -q Validate.C
python3 validateStreamer.py
- name: Full ray-tracing
run: |
source ${{ env.REST_PATH }}/thisREST.sh
cd ${{ env.AXION_LIB_PATH }}/pipeline/ray-tracing/full-chain/
wget https://rest-for-physics.github.io/axionlib-data/solarFlux/fluxes.rml
wget https://rest-for-physics.github.io/axionlib-data/solarFlux/Primakoff_LennertHoof_202203.dat
wget https://rest-for-physics.github.io/axionlib-data/transmission/windows.rml
wget https://rest-for-physics.github.io/axionlib-data/transmission/Al.sol
wget https://rest-for-physics.github.io/axionlib-data/transmission/Cu.sol
wget https://rest-for-physics.github.io/axionlib-data/transmission/C10H8O4.sol
wget https://rest-for-physics.github.io/axionlib-data/optics/xmmTrueWolter.rml
wget https://rest-for-physics.github.io/axionlib-data/optics/XMM.trueWolter
wget https://rest-for-physics.github.io/axionlib-data/opticsMirror/Reflectivity_Single_Au_250_Ni_0.4.N901f
wget https://rest-for-physics.github.io/axionlib-data/opticsMirror/Transmission_Single_Au_250_Ni_0.4.N901f
wget https://rest-for-physics.github.io/axionlib-data/magneticField/fields.rml
wget https://rest-for-physics.github.io/axionlib-data/magneticField/Bykovskiy_201906.dat
wget https://rest-for-physics.github.io/axionlib-data/bufferGas/He.abs
wget https://rest-for-physics.github.io/axionlib-data/bufferGas/He.nff
export REST_LOW_AXION_MASS=1e-2
export REST_HIGH_AXION_MASS=1e-1
export REST_GAS_STEP=2
restManager --c BabyIAXO_Micromegas_XMM.rml --o output.root
restRoot -q ValidateChain.C'("output.root")'
Sensitivity:
name: Sensitivity tests
runs-on: ubuntu-latest
container:
image: ghcr.io/lobis/root-geant4-garfield:rest-for-physics
needs: [ build-axionlib ]
steps:
- uses: rest-for-physics/framework/.github/actions/checkout@master
with:
branch: ${{ env.BRANCH_NAME }}
repository: rest-for-physics/axionlib
path: ${{ env.AXION_LIB_PATH }}
- name: Restore cache
uses: actions/cache@v3
id: axionlib-install-cache
with:
key: ${{ env.BRANCH_NAME }}-${{ github.sha }}
path: ${{ env.REST_PATH }}
- name: Dummy IAXO
run: |
source ${{ env.REST_PATH }}/thisREST.sh
cd ${{ env.AXION_LIB_PATH }}/pipeline/sensitivity/
wget https://rest-for-physics.github.io/axionlib-data/solarFlux/Primakoff_LennertHoof_202203.dat
restRoot -b -q Validation.C