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

Initial commit

parents
No related branches found
No related tags found
No related merge requests found
---
BasedOnStyle: LLVM
BreakConstructorInitializersBeforeComma: true
ConstructorInitializerAllOnOneLineOrOnePerLine: true
Cpp11BracedListStyle: true
Standard: Cpp11
#SpaceBeforeParens: ControlStatements
SpaceAfterControlStatementKeyword: true
PointerBindsToType: true
...
# Compiled Object files
*.slo
*.lo
*.o
# Compiled Dynamic libraries
*.so
*.dylib
# Compiled Static libraries
*.lai
*.la
*.a
# build trees
DEBUG*/*
BUILD*/*
RELEASE*/*
TEST*/*
# cmake
CMakeCache.txt
CMakeFiles
Makefile
cmake_install.cmake
install_manifest.txt
# vim
~*
*.swp
*.swo
# python
__pycache__/
*.py[cod]
*$py.class
.ipynb_checkpoints
# test for calorimeter
calorimeters/test/
*.d
*.pcm
image: eicweb.phy.anl.gov:4567/containers/eic_container/eic:latest
default:
artifacts:
expire_in: 10 mins
paths:
- config/
- results/
- sim_output/
- data
# exclude:
# - .git/
# - datasets/.git/
#before_script:
# - git clone https://eicweb.phy.anl.gov/EIC/NPDet.git
# # - cd NPDet/build && cmake ../. -DCMAKE_INSTALL_PREFIX=/usr/local && make -j10 && make install
# # - cd ../..
stages:
- build
- data_init
- config
- run
- finish
get_data:
stage: data_init
tags:
- sodium
script:
- git clone https://eicweb.phy.anl.gov/EIC/datasets.git datasets
- mkdir -p data
- mkdir -p results
- mkdir -p sim_output
generate_config:
stage: config
needs: ["get_data"]
tags:
- sodium
script:
- mkdir -p config && ./bin/gen_ci_config -p test_ -i dummy > config/dummy_config.yml
- mkdir -p config && ./bin/gen_ci_config -p dis_ -i dis > config/dis_config.yml
dummy-pipeline:
stage: run
needs: ["generate_config"]
trigger:
include:
- artifact: config/dummy_config.yml
job: generate_config
strategy: depend
dis-pipeline:
stage: run
needs: ["generate_config"]
trigger:
include:
- artifact: config/dis_config.yml
job: generate_config
strategy: depend
final_report:
stage: finish
tags:
- sodium
needs: ["dis-pipeline","dummy-pipeline"]
script:
- echo "It was a success!"
Reconstruction Benchmarks for the EIC
=====================================
[![pipeline status](https://eicweb.phy.anl.gov/EIC/reconstruction_benchmarks/badges/master/pipeline.svg)](https://eicweb.phy.anl.gov/EIC/reconstruction_benchmarks/-/commits/master)
## 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
#!/bin/bash
set -o nounset
set -o errexit
BENCHMARK_SCRIPT_DIR=./dummy
CI_TAG=sodium
CI_JOB_PREFIX=test_
CI_FAILURE="true"
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"
echo " --no-failure do not allow failures"
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
;;
--no-failure)
CI_FAILURE="false"
shift # past argument
;;
*) # 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}:
tags:
- ${CI_TAG}
stage: benchmarks
script:
- bash ${script_name}
allow_failure: ${CI_FAILURE}
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}
stage: benchmarks
script:
- root -b -q ${script_name}
allow_failure: ${CI_FAILURE}
EOF
done
#!/bin/bash
echo "Dummy Test..."
echo "..."
echo "Fails!"
exit 1
#!/bin/bash
echo "Dummy Test..."
echo "..."
echo "Passes!"
#exit 1
#!/bin/bash
echo "Dummy Test number 2..."
echo "..."
echo "Passes!"
#exit 1
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