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
BUILDCACHE: "/scratch/richart/buildcache"
SPACK_DISABLE_LOCAL_CONFIG: "true"
SPACK_USER_CACHE_PATH: "/tmp/spack_cache"
# ------------------------------------------------------------------------------
.parallel_job:
parallel:
matrix:
- environment: [helvetios]
slurm_options: ["-c 36"]
# - environment: [jed]
# - environment: [izar]
# slurm_options: ['-c 40 --gres gpu:2']
# apptainer_options: ['-nv']
tags:
- ${environment}
- stack
variables:
COMMAND_OPTIONS_SBATCH: ${slurm_options}
APPTAINER_EXEC_OPTIONS: ${apptainer_options} --bind ${BUILDCACHE}:/buildcache:rw --writable-tmpfs
.setup_spack:
before_script:
- /opt/spack/bin/spack gpg trust $GPG_PRIVATE_KEY
- mkdir -p extra_repos
- cd extra_repos
- git clone https://gitlab.epfl.ch/SCITAS/software-stack/spack-repo-externals.git
- git clone https://gitlab.epfl.ch/SCITAS/software-stack/scitas-spack-packages.git
# ------------------------------------------------------------------------------
spack:setup:
- .parallel_job
- .setup_spack
script:
- >
if [ ! -d /buildcache/build_cache ]; then
/opt/spack/bin/spack gpg publish -d /buildcache
fi
spack:concretize:
- .parallel_job
- .setup_spack
script:
- /opt/spack/bin/spack -e . concretize
needs:
- job: spack:setup
- .parallel_job
- .setup_spack
script:
- /opt/spack/bin/spack -e . install
--log-file spack-install.xml
--log-format junit
--only-concrete
--fail-fast
--show-log-on-error
--use-cache
needs:
- job: spack:concretize