Newer
Older
# yaml-language-server: $schema=gitlab-ci
# yaml-language-server: $format.enable=false
stages:
- environment
- concretize
- install
- deploy
workflow:
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS
when: never
# - 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"]
apptainer_options: ['-nv']
app_image: ["registry.c4science.ch/scitas-stack/rhel9-kuma"]
- environment: [kuma_l40s]
slurm_options: ["-c 64"]
stack: ["pinot-noir-gcc"]
apptainer_options: ['-nv']
app_image: ["registry.c4science.ch/scitas-stack/rhel9-kuma"]
# ------------------------------------------------------------------------------
# ------------------------------------------------------------------------------
.parallel_job:
extends:
- .parallel_definition
BUILDCACHE: "/work/scitas-ge/richart/ci/buildcache"
APPTAINER_EXEC_OPTIONS: ${apptainer_options} --cleanenv --no-home -H $(mktemp -d -p ${FAKEHOME}/):$HOME --bind ${BUILDCACHE}:/buildcache:rw --bind ${MIRROR}:${MOUNT_POINT}/spack-mirror:rw --bind ${CI_PROJECT_DIR}:${MOUNT_POINT} --bind /dev/tty
.spack_cache:
# ------------------------------------------------------------------------------
# ------------------------------------------------------------------------------
spack:checkout:
before_script:
- git config --global --add --bool advice.detachedHead false
script:
- ls
timeout: 1h
spack:setup:
stage: environment
extends:
- .parallel_job
- tar czf artifacts_${stack}_${environment}.tgz $stack/environment
before_script:
- if [ -e artifacts_${stack}_${environment}.tgz ];
then
tar xzf artifacts_${stack}_${environment}.tgz;
- ${STACK_LOCATION}/spack/bin/spack -e ${environment} config blame compilers
artifacts_${stack}_${environment}.tgz
$stack/spack/var/spack/environments
before_script:
- if [ -e artifacts_${stack}_${environment}.tgz ];
then
tar xzf artifacts_${stack}_${environment}.tgz;
- ${STACK_LOCATION}/spack/bin/spack -e ${environment} config blame
- ${STACK_LOCATION}/spack/bin/spack -e ${environment} concretize --force
artifacts_${stack}_${environment}.tgz
$stack/spack/var/spack/environments
- artifacts_${stack}_${environment}.tgz
needs:
before_script:
- if [ -e artifacts_${stack}_${environment}.tgz ];
then
tar xzf artifacts_${stack}_${environment}.tgz;
- ${STACK_LOCATION}/spack/bin/spack -e ${environment} install
--log-format junit
--only-concrete
--fail-fast
--show-log-on-error
- ${STACK_LOCATION}/spack/bin/spack -e ${environment}
--update-index
--key EDC904DCE3D2E84E
/buildcache
artifacts_${stack}_${environment}.tgz
$stack/spack/var/spack/environments
spack:mksquashfs:
stage: deploy
extends:
- .parallel_job
- "mksquashfs ${CI_PROJECT_DIR} stack-${stack}-${environment}-${CI_COMMIT_REF_SLUG}.sqfs"
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file stack-${stack}-${environment}-${CI_COMMIT_REF_SLUG}.sqfs "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/stack/${stack}/stack-${stack}-${environment}-${CI_COMMIT_REF_SLUG}.sqfs"'