-
Notifications
You must be signed in to change notification settings - Fork 4
126 lines (117 loc) · 4.39 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
name: Validation
on:
workflow_dispatch:
workflow_call:
env:
CMAKE_BUILD_TYPE: Release
REST_PATH: /rest/detectorlib/install
DETECTOR_LIB_PATH: detectorlib
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/detectorlib
path: ${{ env.DETECTOR_LIB_PATH }}
- run: python3 ${{ env.DETECTOR_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 detectorlib
uses: rest-for-physics/framework/.github/actions/checkout@master
with:
branch: ${{ env.BRANCH_NAME }}
repository: rest-for-physics/detectorlib
path: ${{ env.DETECTOR_LIB_PATH }}
- name: Verify pre-commit config files match
run: |
cd ${{ env.DETECTOR_LIB_PATH }}
curl https://raw.githubusercontent.com/rest-for-physics/framework/master/scripts/validatePreCommitConfig.py | python
build-detectorlib:
name: Build only detectorlib
runs-on: ubuntu-latest
container:
image: ghcr.io/lobis/root-geant4-garfield:rest-for-physics
steps:
- uses: actions/checkout@v3
- 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_DETECTOR=ON -DREST_GARFIELD=ON"
branch: ${{ env.BRANCH_NAME }}
- name: Load REST libraries
run: |
source ${{ env.REST_PATH }}/thisREST.sh
restRoot -b -q
- name: Cache framework installation
id: detectorlib-install-cache
uses: actions/cache@v3
with:
key: ${{ env.BRANCH_NAME }}-${{ github.sha }}
path: ${{ env.REST_PATH }}
#- name: Load Gas
# run: |
#source ${{ env.REST_PATH }}/thisREST.sh
#cd framework/pipeline/metadata/gas/
#restRoot -b -q LoadGasFromServerAndValidate.C
# Not working, not used in gitlab pipeline
#- name: Generate Gas
# run: |
# source ${{ env.REST_PATH }}/thisREST.sh
# source $(root-config --bindir)/thisroot.sh
# cd framework/pipeline/metadata/gas/
# restRoot -b -q GenerateDummyGas.C
readout:
name: "Readout"
runs-on: ubuntu-latest
container:
image: ghcr.io/lobis/root-geant4-garfield:rest-for-physics
needs: [ build-detectorlib ]
steps:
- uses: rest-for-physics/framework/.github/actions/checkout@master
with:
branch: ${{ env.BRANCH_NAME }}
repository: rest-for-physics/detectorlib
path: ${{ env.DETECTOR_LIB_PATH }}
- name: Restore cache
uses: actions/cache@v3
id: detectorlib-install-cache
with:
key: ${{ env.BRANCH_NAME }}-${{ github.sha }}
path: ${{ env.REST_PATH }}
- name: Manager readout generation
run: |
source ${{ env.REST_PATH }}/thisREST.sh
cd ${{ env.DETECTOR_LIB_PATH }}/pipeline/readout
restManager --c generateReadout.rml --o readout.root
restRoot -b -q PrintReadout.C'("readout.root")'
python3 compareFiles.py
- name: Basic Readout repository tests
run: |
source ${{ env.REST_PATH }}/thisREST.sh
git clone https://github.com/rest-for-physics/basic-readouts.git
cd basic-readouts/
restRoot -b -q GenerateReadouts.C'("basic.root")'
restRoot -b -q BasicValidation.C'("basic.root", "pixelDecoding")'
# We need to introduce basic validation here
# - diff validation.txt print.txt
# - name: Basic Readout
# run: |
# source ${{ env.REST_PATH }}/thisREST.sh
# cd framework/projects/basic-examples/
# git submodule update --init .
# cd basic-readouts
# git submodule update --init .
# restRoot -b -q GenerateReadouts.C'("basic.root")'