image: eicweb.phy.anl.gov:4567/eic/juggler/juggler:$JUGGLER_TAG

default:
  tags:
    - silicon
  artifacts:
    expire_in: 3 days

stages:
  - initialize
  - process
  - collect
  - finish

detector:
  stage: initialize
  needs: []
  timeout: 1 hours
  cache:
    key:
      files:
        - config/env.sh
        - util/build_detector.sh
      prefix: "$CI_COMMIT_REF_SLUG"
    paths:
      - .local/detector
      - .local/lib
  artifacts:
    paths:
      - .local/detector
      - .local/lib
  script:
    - ./util/build_detector.sh

include:
  - local: 'benchmarks/dis/config.yml'
  - local: 'benchmarks/dvmp/config.yml'
  - local: 'benchmarks/dvcs/config.yml'

summary:
  stage: finish
  needs: ["dis:results", "dvcs:results", "dvmp:results"]
  script:
    - ./util/collect_benchmarks.py
  artifacts:
    paths:
      - results/*
    reports:
      junit: ["results/dvcs/report2.xml"]
