-
Notifications
You must be signed in to change notification settings - Fork 5
130 lines (109 loc) · 4.11 KB
/
CIValidations.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
# Performs unit and integration testing
name: Validations CI
# The events that trigger the workflow
on:
pull_request:
branches: [ develop ]
permissions:
contents: read
packages: write
jobs:
build:
runs-on: ubuntu-latest
name: ${{ matrix.name }}
strategy:
fail-fast: false # Prevents cancellation of remaining jobs if one fails
matrix:
include:
- name: Reweight Validations
test_1: ./CIValidations/SplineValidations
test_2: ./CIValidations/SamplePDFValidations
test_3: ./CIValidations/NuOscillatorInterfaceValidations
test_4: empty
test_5: empty
test_6: empty
test_7: empty
- name: Covariance Validations
test_1: ./CIValidations/CovarianceValidations
test_2: ./CIValidations/MaCh3ModeValidations
test_3: ./CIValidations/UnitTests/manager_tests
test_4: empty
test_5: empty
test_6: empty
test_7: empty
- name: Fitter Validations
test_1: ./CIValidations/FitterValidations
test_2: ./bin/ProcessMCMC bin/TutorialDiagConfig.yaml MCMC_Test.root
test_3: ./bin/DiagMCMC MCMC_Test.root bin/TutorialDiagConfig.yaml
test_4: ./bin/RHat 10 MCMC_Test.root MCMC_Test.root MCMC_Test.root MCMC_Test.root
test_5: ./bin/CombineMaCh3Chains -o MergedChain.root MCMC_Test.root MCMC_Test.root MCMC_Test.root MCMC_Test.root
test_6: ./bin/GetPenaltyTerm MCMC_Test.root bin/TutorialDiagConfig.yaml
test_7: ./bin/MatrixPlotter bin/TutorialDiagConfig.yaml MCMC_Test_drawCorr.root
# TODO
#need fixing config
#test_8: bin/GetPostfitParamPlots -o MCMC_Test_drawCorr.root -c Inputs/PlottingConfig.yaml
#test_9: bin/PlotLLH -o MCMC_Test.root -c Inputs/PlottingConfig.yaml
- name: NuMCMC Tools Validations
test_1: ./CIValidations/NuMCMCvalidations.sh
test_2: empty
test_3: empty
test_4: empty
test_5: empty
test_6: empty
test_7: empty
container:
image: ghcr.io/mach3-software/mach3:alma9latest
steps:
- uses: actions/checkout@v4
- name: Get MaCh3 Validations
run: |
cd /opt/
git clone https://github.com/mach3-software/MaCh3Tutorial.git MaCh3Validations
cd MaCh3Validations
mkdir build
cd build
cmake ../ -DMaCh3_Branch=${{ github.head_ref }} -DMaCh3Tutorial_UNITTESTS_ENABLED=TRUE
- name: Build MaCh3 Validations
run: |
cd /opt/MaCh3Validations/build
make -j4 install # Build the project
- name: Validations
run: |
source /opt/MaCh3Validations/build/bin/setup.MaCh3.sh
source /opt/MaCh3Validations/build/bin/setup.MaCh3Tutorial.sh
cd /opt/MaCh3Validations/build
${{ matrix.test_1 }}
#KS: GHA is stupi when it comes to arrays. I tried something fancy but it was crashing terribly
#If you know how to write this better please let me know
# Run the second test if it is defined
if [[ "${{ matrix.test_2 }}" != "empty" ]]; then
echo " "
echo "Performing Second test"
${{ matrix.test_2 }}
fi
# Run the third test if it is defined
if [[ "${{ matrix.test_3 }}" != "empty" ]]; then
echo " "
echo "Performing Third test"
${{ matrix.test_3 }}
fi
if [[ "${{ matrix.test_4 }}" != "empty" ]]; then
echo " "
echo "Performing test 4"
${{ matrix.test_4 }}
fi
if [[ "${{ matrix.test_5 }}" != "empty" ]]; then
echo " "
echo "Performing test 5"
${{ matrix.test_5 }}
fi
if [[ "${{ matrix.test_6 }}" != "empty" ]]; then
echo " "
echo "Performing test 6"
${{ matrix.test_6 }}
fi
if [[ "${{ matrix.test_7 }}" != "empty" ]]; then
echo " "
echo "Performing test 7"
${{ matrix.test_7 }}
fi