Skip to content
Snippets Groups Projects
Commit 285146e2 authored by Whitney Armstrong's avatar Whitney Armstrong
Browse files

modified: .gitlab-ci.yml

	new file:   bin/gen_ci_config
	new file:   calorimeters/dummy_test2.sh
	deleted:    calorimeters/gen_ci_config
parent 5361d01a
No related branches found
No related tags found
No related merge requests found
......@@ -13,7 +13,8 @@ default:
stages:
- data_init
- detectors
- benchmarks
# - simulate
#- others
get_data:
......@@ -24,42 +25,73 @@ get_data:
- git clone https://eicweb.phy.anl.gov/EIC/datasets.git datasets
- ln -s datasets/data
- mkdir -p results
# artifacts:
# paths:
# - datasets
track_test1:
stage: detectors
generate_config:
stage: data_init
tags:
- sodium
script:
- bash trackers/dummy_test.sh
allow_failure: true
- ./bin/gen_ci_config -p track_test_ -i trackers > results/trackers_config.yml
- ./bin/gen_ci_config -p cal_test_ -i calorimeters > results/calorimeters_config.yml
- ./bin/gen_ci_config -p pid_test_ -i pid > results/pid_config.yml
cal_test1:
stage: detectors
tags:
- sodium
script:
- bash calorimeters/dummy_test.sh
allow_failure: true
calorimeters-pipeline:
stage: benchmarks
trigger:
include:
- artifact: results/calorimeters_config.yml
job: generate-config
cal_test2:
stage: detectors
tags:
- sodium
script:
- root -b -q calorimeters/zdc_neutrons_reader.cxx
allow_failure: true
trackers-pipeline:
stage: benchmarks
trigger:
include:
- artifact: results/trackers_config.yml
job: generate-config
pid-pipeline:
stage: benchmarks
trigger:
include:
- artifact: results/pid_config.yml
job: generate-config
pid_test1:
stage: detectors
tags:
- sodium
script:
- bash pid/dummy_test.sh
allow_failure: true
# artifacts:
# paths:
# - datasets
#track_test1:
# stage: detectors
# tags:
# - sodium
# script:
# - bash trackers/dummy_test.sh
# allow_failure: true
#
#cal_test1:
# stage: detectors
# tags:
# - sodium
# script:
# - bash calorimeters/dummy_test.sh
# allow_failure: true
#
#cal_test2:
# stage: detectors
# tags:
# - sodium
# script:
# - root -b -q calorimeters/zdc_neutrons_reader.cxx
# allow_failure: true
#pid_test1:
# stage: detectors
# tags:
# - sodium
# script:
# - bash pid/dummy_test.sh
# allow_failure: true
#pages:
......
......@@ -3,11 +3,15 @@ set -o nounset
set -o errexit
CI_TAG=sodium
BENCHMARK_SCRIPT_DIR=.
CI_JOB_PREFIX=cal_test_
function print_the_help {
echo "USAGE: $0 [-t <runner_tag>] "
echo " OPTIONS: "
echo " -i,--input Input scripts directory "
echo " -t,--tag Gitlab Runner tag"
echo " -p,--prefix job name prefix"
exit
}
......@@ -20,11 +24,21 @@ do
shift # past argument
print_the_help
;;
-i|--input)
BENCHMARK_SCRIPT_DIR="$2"
shift # past argument
shift # past value
;;
-t|--tag)
CI_TAG="$2"
shift # past argument
shift # past value
;;
-p|--prefix)
CI_JOB_PREFIX="$2"
shift # past argument
shift # past value
;;
*) # unknown option
#POSITIONAL+=("$1") # save it in an array for later
echo "unknown option $1"
......@@ -35,21 +49,38 @@ do
done
set -- "${POSITIONAL[@]}" # restore positional parameters
cat <<EOF
cal_test1:
stage: detectors
shopt -s nullglob
ifile=0
for script_name in ${BENCHMARK_SCRIPT_DIR}/*.sh
do
filename=$(basename ${script_name})
filename_noext="${filename%%.*}"
ifile=$((ifile+1))
cat <<EOF
${CI_JOB_PREFIX}${ifile}_${filename_noext}:
tags:
- ${CI_TAG}
script:
- bash calorimeters/dummy_test.sh
- bash ${script_name}
allow_failure: true
cal_test2:
stage: detectors
EOF
done
for script_name in ${BENCHMARK_SCRIPT_DIR}/*.cxx
do
filename=$(basename ${script_name})
filename_noext="${filename%%.*}"
ifile=$((ifile+1))
cat <<EOF
${CI_JOB_PREFIX}${ifile}_${filename_noext}:
tags:
- ${CI_TAG}
script:
- root -b -q calorimeters/zdc_neutrons_reader.cxx
- root -b -q ${script_name}
allow_failure: true
EOF
done
#!/bin/bash
echo "Calorimeter Dummy Test 2..."
echo "passes."
exit 0
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment