Skip to content
Snippets Groups Projects
.gitlab-ci.yml 3.29 KiB
image: ${BENCHMARKS_REGISTRY}/${BENCHMARKS_CONTAINER}:${BENCHMARKS_TAG}

variables:
  RECO: "eicrecon"

default:
  before_script:
    - source .local/bin/env.sh
  tags:
    - phy-scratch
  artifacts:
    expire_in: 3 days
    paths:
      - .local/detector
      - .local/lib
      - .local/bin
      - .local/include
      - .local/share
      - .local/root_build
      - results
      - config
      - juggler.env
    reports:
      dotenv: juggler.env

stages:
  - status-pending
  - config
  - initialize
  - compile
  - generate
  - simulate
  - reconstruct
  - analyze
  - collect
  - finish
  - status-report

.status:
  before_script: []
  script:
    - |
      if [ -n "${GITHUB_SHA}" ] ; then
        curl \
          -X POST \
          -H "Accept: application/vnd.github+json" \
          -H "Authorization: token ${GITHUB_REPO_STATUS_TOKEN}" \
          "https://api.github.com/repos/${GITHUB_REPOSITORY}/statuses/${GITHUB_SHA}" \
          -d '{"state":"'"${STATE}"'",
               "target_url":"'"${CI_PIPELINE_URL}"'",
               "description":"'"${DESCRIPTION} $(TZ=America/New_York date)"'",
               "context":"eicweb/physics_benchmarks ('"$DETECTOR_CONFIG"')"
              }' ;
      fi

benchmarks:physics:pending:
  stage: status-pending
  extends: .status
  variables:
    STATE: "pending"
    DESCRIPTION: "Started..."
  when: always

common:setup:
  stage: config
  before_script:
    - |
      if [[ "${COMMON_BENCH_VERSION}" == "" ]] ; then
        export COMMON_BENCH_VERSION="master" 
      fi