11name : Validation
22
33on :
4- push :
5- branches : [ "master" ]
6- pull_request :
7- branches : [ "master" ]
8- release :
9-
104 workflow_dispatch :
5+ workflow_call :
116
127env :
138 CMAKE_BUILD_TYPE : Release
149 REST_PATH : /rest/rawlib/install
10+ RAW_LIB_PATH : rawlib
1511 BRANCH_NAME : ${{ github.head_ref || github.ref_name }}
1612
1713defaults :
1814 run :
1915 shell : bash
2016
2117jobs :
22- framework-validation :
23- uses : rest-for-physics/framework/.github/workflows/validation.yml@master
24-
18+
2519 libCheck :
2620 name : Validate library
2721 runs-on : ubuntu-latest
2822 container :
2923 image : ghcr.io/lobis/root-geant4-garfield:rest-for-physics
3024 steps :
31- - uses : actions/checkout@v3
32- - run : python3 pipeline/validateLibrary.py .
25+ - uses : rest-for-physics/framework/.github/actions/checkout@master
26+ with :
27+ branch : ${{ env.BRANCH_NAME }}
28+ repository : rest-for-physics/rawlib
29+ path : ${{ env.RAW_LIB_PATH }}
30+ - run : python3 ${{ env.RAW_LIB_PATH }}/pipeline/validateLibrary.py .
31+
32+ precommit-config :
33+ name : Validate pre-commit config
34+ runs-on : ubuntu-latest
35+ container :
36+ image : ghcr.io/lobis/root-geant4-garfield:rest-for-physics
37+ steps :
38+ - name : Checkout rawlib
39+ uses : rest-for-physics/framework/.github/actions/checkout@master
40+ with :
41+ branch : ${{ env.BRANCH_NAME }}
42+ repository : rest-for-physics/rawlib
43+ path : ${{ env.RAW_LIB_PATH }}
44+ - name : Verify pre-commit config files match
45+ run : |
46+ cd ${{ env.RAW_LIB_PATH }}
47+ curl https://raw.githubusercontent.com/rest-for-physics/framework/master/scripts/validatePreCommitConfig.py | python
3348
3449 build-rawlib :
3550 name : Build only rawlib
3651 runs-on : ubuntu-latest
3752 container :
3853 image : ghcr.io/lobis/root-geant4-garfield:rest-for-physics
3954 steps :
40- - uses : actions/checkout@v3
4155 - name : Build and install
4256 uses : rest-for-physics/framework/.github/actions/build@master
4357 with :
5771 image : ghcr.io/lobis/root-geant4-garfield:rest-for-physics
5872 needs : [ build-rawlib ]
5973 steps :
60- - uses : actions/checkout@v3
74+ - uses : rest-for-physics/framework/.github/actions/checkout@master
75+ with :
76+ branch : ${{ env.BRANCH_NAME }}
77+ repository : rest-for-physics/rawlib
78+ path : ${{ env.RAW_LIB_PATH }}
6179 - name : Restore cache
6280 uses : actions/cache@v3
6381 id : rawlib-install-cache
@@ -67,38 +85,38 @@ jobs:
6785 - name : Add signal noise
6886 run : |
6987 source ${{ env.REST_PATH }}/thisREST.sh
70- cd pipeline/processes/noise
88+ cd ${{ env.RAW_LIB_PATH }}/ pipeline/processes/noise
7189 python addNoise.py
7290 - name : Common Noise
7391 run : |
7492 source ${{ env.REST_PATH }}/thisREST.sh
75- cd pipeline/processes/commonNoise
93+ cd ${{ env.RAW_LIB_PATH }}/ pipeline/processes/commonNoise
7694 restRoot -b -q commonNoise.C
7795 - name : Veto Analysis
7896 run : |
7997 source ${{ env.REST_PATH }}/thisREST.sh
80- cd pipeline/processes/veto
98+ cd ${{ env.RAW_LIB_PATH }}/ pipeline/processes/veto
8199 restManager --c veto.rml --f ../../data/R01208_Ar2Iso_Background14h_14Vetos_IccubFEC-000.aqs
82100 python vetoValidation.py
83101 - name : Signal Shaping
84102 run : |
85103 source ${{ env.REST_PATH }}/thisREST.sh
86- cd pipeline/processes/shaping
104+ cd ${{ env.RAW_LIB_PATH }}/ pipeline/processes/shaping
87105 restRoot -b -q shaping.C
88106 - name : Fitting Process
89107 run : |
90108 source ${{ env.REST_PATH }}/thisREST.sh
91- cd pipeline/processes/fit
109+ cd ${{ env.RAW_LIB_PATH }}/ pipeline/processes/fit
92110 restRoot -b -q fit.C
93111 - name : General Fit Process
94112 run : |
95113 source ${{ env.REST_PATH }}/thisREST.sh
96- cd pipeline/processes/fit
114+ cd ${{ env.RAW_LIB_PATH }}/ pipeline/processes/fit
97115 restRoot -b -q GeneralFit.C
98116 - name : Analysis Process
99117 run : |
100118 source ${{ env.REST_PATH }}/thisREST.sh
101- cd pipeline/processes/analysis
119+ cd ${{ env.RAW_LIB_PATH }}/ pipeline/processes/analysis
102120 restManager --c veto.rml --f ../../data/R01208_Ar2Iso_Background14h_14Vetos_IccubFEC-000.aqs
103121 restRoot -b -q validate.C
104122
@@ -109,7 +127,11 @@ jobs:
109127 image : ghcr.io/lobis/root-geant4-garfield:rest-for-physics
110128 needs : [ build-rawlib ]
111129 steps :
112- - uses : actions/checkout@v3
130+ - uses : rest-for-physics/framework/.github/actions/checkout@master
131+ with :
132+ branch : ${{ env.BRANCH_NAME }}
133+ repository : rest-for-physics/rawlib
134+ path : ${{ env.RAW_LIB_PATH }}
113135 - name : Restore cache
114136 uses : actions/cache@v3
115137 id : rawlib-install-cache
@@ -119,6 +141,6 @@ jobs:
119141 - name : Dream data
120142 run : |
121143 source ${{ env.REST_PATH }}/thisREST.sh
122- cd pipeline/external/dream
144+ cd ${{ env.RAW_LIB_PATH }}/ pipeline/external/dream
123145 restManager --c dream.rml --f dummyDreamData.fdf
124146 restRoot -b -q dream.C
0 commit comments