Skip to content

Commit

Permalink
Merge pull request #134 from mach3-software/feature_MoreCI
Browse files Browse the repository at this point in the history
More MCMC Diag to CI
  • Loading branch information
KSkwarczynski authored Sep 30, 2024
2 parents 827258e + 6135b58 commit d7161e2
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 21 deletions.
75 changes: 56 additions & 19 deletions .github/workflows/CIValidations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,42 @@ jobs:
matrix:
include:
- name: Spline Validations
first_test: Apps/SplineValidations
second_test: empty
third_test: empty
test_1: Apps/SplineValidations
test_2: empty
test_3: empty
test_4: empty
test_5: empty
test_6: empty

- name: Covariance Validations
first_test: Apps/CovarianceValidations
second_test: Apps/MaCh3ModeValidations
third_test: empty
test_1: Apps/CovarianceValidations
test_2: Apps/MaCh3ModeValidations
test_3: empty
test_4: empty
test_5: empty
test_6: empty

- name: Fitter Validations
first_test: Apps/FitterValidations
second_test: ./bin/ProcessMCMC bin/TutorialDiagConfig.yaml MCMC_Test.root
third_test: ./bin/DiagMCMC MCMC_Test.root bin/TutorialDiagConfig.yaml
test_1: Apps/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: empty
# TODO
#fourth_test: bin/GetPostfitParamPlots -o MCMC_Test_Process.root -c Inputs/PlottingConfig.yaml
#fifth_test: bin/PlotLLH -o MCMC_Test.root -c Inputs/PlottingConfig.yaml
# Stupid no idea why ROOT segfault when cleaning program...
#test_4: ./bin/GetPenaltyTerm MCMC_Test.root bin/TutorialDiagConfig.yaml
#need fixing config
#test_7: bin/GetPostfitParamPlots -o MCMC_Test_Process.root -c Inputs/PlottingConfig.yaml
#test_8: bin/PlotLLH -o MCMC_Test.root -c Inputs/PlottingConfig.yaml

- name: NuMCMC Tools Validations
first_test: Apps/NuMCMCvalidations.sh
second_test: empty
third_test: empty
test_1: Apps/NuMCMCvalidations.sh
test_2: empty
test_3: empty
test_4: empty
test_5: empty
test_6: empty

container:
image: ghcr.io/mach3-software/mach3:alma9latest
Expand Down Expand Up @@ -69,17 +85,38 @@ jobs:
source /opt/MaCh3Validations/build/bin/setup.MaCh3.sh
source /opt/MaCh3Validations/build/bin/setup.MaCh3Tutorial.sh
cd /opt/MaCh3Validations/build
${{ matrix.first_test }}
${{ 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.second_test }}" != "empty" ]]; then
if [[ "${{ matrix.test_2 }}" != "empty" ]]; then
echo " "
echo "Performing Second test"
${{ matrix.second_test }}
${{ matrix.test_2 }}
fi
# Run the third test if it is defined
if [[ "${{ matrix.third_test }}" != "empty" ]]; then
if [[ "${{ matrix.test_3 }}" != "empty" ]]; then
echo " "
echo "Performing Third test"
${{ matrix.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
4 changes: 2 additions & 2 deletions Diagnostics/CombineMaCh3Chains.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ void CombineChain()
void usage(){
MACH3LOG_INFO("Combine MaCh3 Chains files, very similar to hadd, but will compare embedded version info in the files to avoid accidentally combining files made with different software versions. Also avoids having a hige dump of separate version files in the output that happens with hadd.");
MACH3LOG_INFO("Cmd line syntax should be:");
MACH3LOG_INFO("combineND280Splines [-h] [-c [0-9]] [-f] [-o <output file>] input1.root [input2.root, input3.root ...]");
MACH3LOG_INFO("CombineMaCh3Chains [-h] [-c [0-9]] [-f] [-o <output file>] input1.root [input2.root, input3.root ...]");
MACH3LOG_INFO("inputX.root : names of individual spline files to combine, can specify any number, need at least one");
MACH3LOG_INFO("output file : name of combined spline file. optional: if not specified, the app will just use the first input file as the output, the same as hadd'");
MACH3LOG_INFO("-c : target compression level for the combined file, default is 1, in line with hadd");
Expand Down Expand Up @@ -271,5 +271,5 @@ int main(int argc, char *argv[])
SetMaCh3LoggerFormat();
ParseArg(argc, argv);
CombineChain();
return 1;
return 0;
}

0 comments on commit d7161e2

Please sign in to comment.