diff --git a/.gitignore b/.gitignore index aa8b5a9b9b9ee5e9b2b549a22ad448633a23efb3..a743d854509495f714935dff92e7324677b2aa96 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ results/* data/* datasets/* +data diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 93f47cccf35c3bc3270355fd3d7ddd7a5cde005c..40a2f9aa4b77303114828c2f0a889cea667d1df3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,6 +6,9 @@ default: - results/ - datasets/ - data + # exclude: + # - .git/ + # - datasets/.git/ stages: diff --git a/README.md b/README.md index fc6c28fef884e6162b80f75ba0408590bb405fa7..edf01dffd05e03b0d7d2476b847f0b61fb2362a1 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,11 @@ Benchmarks for NPDet ==================== + +## Adding new benchmarks + +### Pass/Fail tests + +- Create a script that returns exit status 0 for success. +- Any non-zero value will be considered failure. +- Script + diff --git a/calorimeters/gen_ci_config b/calorimeters/gen_ci_config new file mode 100755 index 0000000000000000000000000000000000000000..a6686320c3ca4755e6b091b0a5e60aca674e4c5f --- /dev/null +++ b/calorimeters/gen_ci_config @@ -0,0 +1,55 @@ +#!/bin/bash +set -o nounset +set -o errexit + +CI_TAG=sodium + +function print_the_help { + echo "USAGE: $0 [-t <runner_tag>] " + echo " OPTIONS: " + echo " -t,--tag Gitlab Runner tag" + exit +} + +POSITIONAL=() +while [[ $# -gt 0 ]] +do + key="$1" + case $key in + -h|--help) + shift # past argument + print_the_help + ;; + -t|--tag) + CI_TAG="$2" + shift # past argument + shift # past value + ;; + *) # unknown option + #POSITIONAL+=("$1") # save it in an array for later + echo "unknown option $1" + print_the_help + shift # past argument + ;; + esac +done +set -- "${POSITIONAL[@]}" # restore positional parameters + +cat <<EOF +cal_test1: + stage: detectors + tags: + - ${CI_TAG} + script: + - bash calorimeters/dummy_test.sh + allow_failure: true + +cal_test2: + stage: detectors + tags: + - ${CI_TAG} + script: + - root -b -q calorimeters/zdc_neutrons_reader.cxx + allow_failure: true + +EOF