Skip to content
Snippets Groups Projects
.gitlab-ci.yml 5.28 KiB
# yaml-language-server: $schema=gitlab-ci
# yaml-language-server: $format.enable=false

stages:
  - environment
  - compilers
  - concretize
  - install
  - deploy

workflow:
  rules:
    - if: $CI_PIPELINE_SOURCE == "merge_request_event"
    - if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS
      when: never
    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH

variables:
  TERM: ansi

.parallel_definition:
  parallel:
    matrix:
      - environment: [jed]
        slurm_options: ["-c 72 -p jed -q jed"]
        stack: ["pinot-noir"]
        app_image: ["registry.c4science.ch/scitas-stack/rhel9-kuma"]
      - environment: [helvetios]
        slurm_options: ["-c 36"]
        stack: ["pinot-noir"]
        app_image: ["registry.c4science.ch/scitas-stack/rhel9-kuma"]
      # - environment: [izar]
      #   slurm_options: ['-c 40 --gpus 2']
      #   apptainer_options: ['-nv']
      #   stack: ["pinot-noir"]
      # - environment: [kuma-l40s]
      #   slurm_options: ['-c 64 --gres gpu:8']
      #   apptainer_options: ['-nv']
      #   stack: ["pinot-noir"]
      # - environment: [kuma-h100]
      #   slurm_options: ['-c 64 --gres gpu:4']
      #   apptainer_options: ['-nv']
      #   stack: ["pinot-noir"]
  tags:
    - ${environment}
    - stack
  variables:
    environment: ${environment}
  image: ${app_image}
# ------------------------------------------------------------------------------
# ------------------------------------------------------------------------------
.parallel_job:
  extends:
    - .parallel_definition
  variables:
    MOUNT_POINT: /stack
    BUILDCACHE: "/work/scitas-ge/richart/ci/buildcache"
    COMMAND_OPTIONS_SBATCH: ${slurm_options}
    APPTAINER_EXEC_OPTIONS: ${apptainer_options} --cleanenv --no-home --bind ${BUILDCACHE}:/buildcache:rw --bind ${CI_PROJECT_DIR}:${MOUNT_POINT} --bind /dev/tty

.spack_cache:
  cache:
    key: ${stack}-${environment}-spack-cache
    policy: pull-push
    paths:
      - ${stack}

# ------------------------------------------------------------------------------
# ------------------------------------------------------------------------------
spack:checkout: