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: ...@@ -13,7 +13,8 @@ default:
stages: stages:
- data_init - data_init
- detectors - benchmarks
# - simulate
#- others #- others
get_data: get_data:
...@@ -24,42 +25,73 @@ get_data: ...@@ -24,42 +25,73 @@ get_data:
- git clone https://eicweb.phy.anl.gov/EIC/datasets.git datasets - git clone https://eicweb.phy.anl.gov/EIC/datasets.git datasets
- ln -s datasets/data - ln -s datasets/data
- mkdir -p results - mkdir -p results
# artifacts:
# paths:
# - datasets
track_test1: generate_config:
stage: detectors stage: data_init
tags: tags:
- sodium - sodium
script: script:
- bash trackers/dummy_test.sh - ./bin/gen_ci_config -p track_test_ -i trackers > results/trackers_config.yml
allow_failure: true - ./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: calorimeters-pipeline:
stage: detectors stage: benchmarks
tags: trigger:
- sodium include:
script: - artifact: results/calorimeters_config.yml
- bash calorimeters/dummy_test.sh job: generate-config
allow_failure: true
cal_test2: trackers-pipeline:
stage: detectors stage: benchmarks
tags: trigger:
- sodium include:
script: - artifact: results/trackers_config.yml
- root -b -q calorimeters/zdc_neutrons_reader.cxx job: generate-config
allow_failure: true
pid-pipeline:
stage: benchmarks
trigger:
include:
- artifact: results/pid_config.yml
job: generate-config
pid_test1: # artifacts:
stage: detectors # paths:
tags: # - datasets
- sodium
script: #track_test1:
- bash pid/dummy_test.sh # stage: detectors
allow_failure: true # 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: #pages:
......
...@@ -3,11 +3,15 @@ set -o nounset ...@@ -3,11 +3,15 @@ set -o nounset
set -o errexit set -o errexit
CI_TAG=sodium CI_TAG=sodium
BENCHMARK_SCRIPT_DIR=.
CI_JOB_PREFIX=cal_test_
function print_the_help { function print_the_help {
echo "USAGE: $0 [-t <runner_tag>] " echo "USAGE: $0 [-t <runner_tag>] "
echo " OPTIONS: " echo " OPTIONS: "
echo " -i,--input Input scripts directory "
echo " -t,--tag Gitlab Runner tag" echo " -t,--tag Gitlab Runner tag"
echo " -p,--prefix job name prefix"
exit exit
} }
...@@ -20,11 +24,21 @@ do ...@@ -20,11 +24,21 @@ do
shift # past argument shift # past argument
print_the_help print_the_help
;; ;;
-i|--input)
BENCHMARK_SCRIPT_DIR="$2"
shift # past argument
shift # past value
;;
-t|--tag) -t|--tag)
CI_TAG="$2" CI_TAG="$2"
shift # past argument shift # past argument
shift # past value shift # past value
;; ;;
-p|--prefix)
CI_JOB_PREFIX="$2"
shift # past argument
shift # past value
;;
*) # unknown option *) # unknown option
#POSITIONAL+=("$1") # save it in an array for later #POSITIONAL+=("$1") # save it in an array for later
echo "unknown option $1" echo "unknown option $1"
...@@ -35,21 +49,38 @@ do ...@@ -35,21 +49,38 @@ do
done done
set -- "${POSITIONAL[@]}" # restore positional parameters set -- "${POSITIONAL[@]}" # restore positional parameters
cat <<EOF shopt -s nullglob
cal_test1: ifile=0
stage: detectors
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: tags:
- ${CI_TAG} - ${CI_TAG}
script: script:
- bash calorimeters/dummy_test.sh - bash ${script_name}
allow_failure: true allow_failure: true
cal_test2: EOF
stage: detectors 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: tags:
- ${CI_TAG} - ${CI_TAG}
script: script:
- root -b -q calorimeters/zdc_neutrons_reader.cxx - root -b -q ${script_name}
allow_failure: true allow_failure: true
EOF 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