Skip to content
Snippets Groups Projects
Select Git revision
  • bb59552ecf17749936c2ec3caf4fb68b259cb3e0
  • main default protected
  • use-eicrecon-algorithms
  • wdconinc-main-patch-85492
  • feat-context-service-overhaul
  • wdconinc-main-patch-17306
  • 73-add-rich-irt-algorithm
  • less-jug-xl-master
  • wdconinc-main-patch-83553
  • acts-seeding-21
  • eicrecon-migration
  • wdconinc-main-patch-77189
  • calorimeter-hit-digi-with-random-svc
  • trackprojection_writeout
  • standalone
  • feat-add-ActsSvc
  • silicon-tracker-digi
  • calorimeter-hit-digi
  • master protected
  • test-main
  • algorithms-integration-calorimeter-hit-digi
  • v15.0.2
  • v15.0.1
  • v15.0.0
  • v14.3.0
  • v14.2.2
  • v14.2.1
  • v14.2.0
  • v14.1.0
  • v14.0.3
  • v14.0.2
  • v14.0.1
  • v14.0.0
  • v13.0.0
  • v12.0.0
  • v11.0.0
  • v10.1.0
  • v10.0.1
  • v10.0.0
  • v9.4.0
  • v9.3.0
41 results

draw_cluster.py

Blame
  • gen_ci_config 1.79 KiB
    #!/bin/bash
    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 
    }
    
    POSITIONAL=()
    while [[ $# -gt 0 ]]
    do
      key="$1"
      case $key in
        -h|--help)
          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"
          print_the_help
          shift # past argument
          ;;
      esac
    done
    set -- "${POSITIONAL[@]}" # restore positional parameters
    
    shopt -s nullglob
    ifile=0
    
    
    cat <<EOF 
    stages:
      #- simulate
      - benchmarks
    EOF
    
    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}:
      stage: benchmarks
      script:
        - bash ${script_name}
      artifact:
        paths: 
          - results/
      allow_failure: true
    
    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}:
      stage: benchmarks
      script:
        - root -b -q ${script_name}
      artifact:
        paths: 
          - results/
      allow_failure: true
    
    EOF
    done