From 3270f7b96af445830831cf7c29bddba1da8e812b Mon Sep 17 00:00:00 2001 From: Whitney Armstrong <warmstrong@anl.gov> Date: Sat, 3 Oct 2020 22:16:36 -0500 Subject: [PATCH] Adding dummy to test dynamic triggers - testing dynamic triggers. --- .gitlab-ci.yml | 226 ++------------------------------------- bin/gen_ci_config | 4 +- dis/.gitignore | 0 dummy/.gitignore | 0 dummy/dummy_fail_test.sh | 7 ++ dummy/dummy_test.sh | 7 ++ dummy/dummy_test2.sh | 7 ++ 7 files changed, 34 insertions(+), 217 deletions(-) create mode 100644 dis/.gitignore create mode 100644 dummy/.gitignore create mode 100644 dummy/dummy_fail_test.sh create mode 100644 dummy/dummy_test.sh create mode 100644 dummy/dummy_test2.sh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 40d1d6ca..72166b1b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,6 +4,7 @@ default: artifacts: expire_in: 10 mins paths: + - config/ - results/ - datasets/ - sim_output/ @@ -18,11 +19,8 @@ default: stages: - data_init - # - ci_gen - - simulate + - ci_gen - benchmarks - - deploy - #- others get_data: stage: data_init @@ -34,218 +32,16 @@ get_data: - mkdir -p results - mkdir -p sim_output -#generate_config: -# stage: ci_gen -# tags: -# - sodium -# script: -# - ./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_sim_1_dummy_test2: - stage: simulate - tags: - - sodium - needs: - - ["get_data"] - script: - - echo "here we run simulation" - -cal_test_1_dummy_test2: - stage: benchmarks - needs: - - ["cal_sim_1_dummy_test2"] - tags: - - sodium - script: - - bash calorimeters/dummy_test2.sh - allow_failure: true - - #cal_test_2_dummy_test: - # stage: benchmarks - # tags: - # - sodium - # script: - # - bash calorimeters/dummy_test.sh - # allow_failure: true - -cal_test_3_zdc_neutrons_reader: - stage: benchmarks - tags: - - sodium - needs: - - ["zdc_simulation"] - script: - - root -b -q calorimeters/zdc_neutrons_reader.cxx - allow_failure: true - -pid_test_1_dummy_test: - stage: benchmarks - tags: - - sodium - needs: - - ["cal_sim_1_dummy_test2"] - script: - - bash pid/dummy_test.sh - allow_failure: true - -track_test_1_dummy_test: - stage: benchmarks - needs: - - ["cal_sim_1_dummy_test2"] - tags: - - sodium - script: - - bash trackers/dummy_test.sh - allow_failure: true - -roman_pot_simu: - stage: simulate - needs: - - ["get_data"] - tags: - - sodium - script: - - cp NPDet/src/GenericDetectors/trackers/compact/elements.xml ./. - - cp NPDet/src/GenericDetectors/trackers/compact/materials.xml ./. - - bash trackers/roman_pot_simu.sh - -roman_pot_nhits: - stage: benchmarks - needs: - - ["roman_pot_simu"] - tags: - - sodium - script: - - root -b -q trackers/simple_tracking.cxx+ - allow_failure: true - -roman_pot_eta: - stage: benchmarks +generate_config: + stage: ci_gen tags: - sodium - needs: - - ["roman_pot_simu"] script: - - root -b -q trackers/roman_pot_hit_eta.cxx+ - allow_failure: true - -zdc_simulation: - stage: simulate - needs: - - ["get_data"] - tags: - - sodium - script: - - cp NPDet/src/GenericDetectors/calorimeters/compact/elements.xml ./. - - cp NPDet/src/GenericDetectors/calorimeters/compact/materials.xml ./. - - bash calorimeters/run_simulation_zdc.sh - -zdc_benchmark: - stage: benchmarks - tags: - - sodium - needs: - - ["zdc_simulation"] - dependencies: - - zdc_simulation - script: - - ls -lrth sim_output - - root -b -q calorimeters/simple_checking.cxx+ - allow_failure: true - -zdc_benchmark_info_histogram: - stage: benchmarks - needs: - - ["zdc_simulation"] - tags: - - sodium - dependencies: - - zdc_simulation - script: - - cp NPDet/src/GenericDetectors/calorimeters/compact/elements.xml calorimeters/ - - cp NPDet/src/GenericDetectors/calorimeters/compact/materials.xml calorimeters/ - - root -b -q calorimeters/simple_info_plot_histograms.cxx+ - allow_failure: true - -crystal_emcal_simulation: - stage: simulate - needs: - - ["get_data"] - tags: - - sodium - script: - - cp NPDet/src/GenericDetectors/calorimeters/compact/elements.xml ./. - - cp NPDet/src/GenericDetectors/calorimeters/compact/materials.xml ./. - - bash calorimeters/run_simulation_crystal.sh - -crystal_benchmark: - stage: benchmarks - tags: - - sodium - needs: - - ["crystal_emcal_simulation"] - script: - - ls -lrth sim_output - - root -b -q calorimeters/simple_checking_crystal.cxx+ - allow_failure: true - -deploy_results: - stage: deploy - needs: - - ["zdc_benchmark","zdc_benchmark_info_histogram"] - tags: - - sodium - script: - - echo "deploy results!" - - # 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 - + - ./bin/gen_ci_config -p test_ -i dummy > config/dummy_config.yml - #pages: - # image: alpine - # when: manual - # stage: build - # script: - # - apk update && apk add doxygen graphviz ttf-ubuntu-font-family - # - cd doc && doxygen Doxyfile && mv doxygen_output/html/ ../public/ - # artifacts: - # paths: - # - public # only: - # - master +child-pipeline: + stage: run + trigger: + include: + - artifact: config/dummy_config.yml + job: generate-config diff --git a/bin/gen_ci_config b/bin/gen_ci_config index debe668f..80e5e7a4 100755 --- a/bin/gen_ci_config +++ b/bin/gen_ci_config @@ -3,8 +3,8 @@ set -o nounset set -o errexit CI_TAG=sodium -BENCHMARK_SCRIPT_DIR=. -CI_JOB_PREFIX=cal_test_ +BENCHMARK_SCRIPT_DIR=./dummy +CI_JOB_PREFIX=test_ function print_the_help { echo "USAGE: $0 [-t <runner_tag>] " diff --git a/dis/.gitignore b/dis/.gitignore new file mode 100644 index 00000000..e69de29b diff --git a/dummy/.gitignore b/dummy/.gitignore new file mode 100644 index 00000000..e69de29b diff --git a/dummy/dummy_fail_test.sh b/dummy/dummy_fail_test.sh new file mode 100644 index 00000000..f8c506b3 --- /dev/null +++ b/dummy/dummy_fail_test.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +echo "Dummy Test..." +echo "..." +echo "Fails!" + +exit 1 diff --git a/dummy/dummy_test.sh b/dummy/dummy_test.sh new file mode 100644 index 00000000..5af1dc34 --- /dev/null +++ b/dummy/dummy_test.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +echo "Dummy Test..." +echo "..." +echo "Passes!" + +#exit 1 diff --git a/dummy/dummy_test2.sh b/dummy/dummy_test2.sh new file mode 100644 index 00000000..dfede272 --- /dev/null +++ b/dummy/dummy_test2.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +echo "Dummy Test number 2..." +echo "..." +echo "Passes!" + +#exit 1 -- GitLab