Skip to content
Snippets Groups Projects
Commit 984cfaca authored by Nicolas Richart's avatar Nicolas Richart
Browse files

Adding conf file and external bind for storage

parent d65be6b7
No related branches found
No related tags found
No related merge requests found
Pipeline #179103 failed
......@@ -16,6 +16,8 @@ workflow:
variables:
BUILDCACHE: "/scratch/richart/buildcache"
SPACK_PATH: "/work/scitas-ge/richart/ci_cache/spack"
STACK_PATH: "/work/scitas-ge/richart/ci_cache/stack"
SPACK_DISABLE_LOCAL_CONFIG: "true"
SPACK_USER_CACHE_PATH: "/tmp/spack_cache"
......@@ -35,37 +37,54 @@ variables:
- 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
APPTAINER_EXEC_OPTIONS: ${apptainer_options} --bind ${BUILDCACHE}:/buildcache:rw --bind ${SPACK_PATH}:/spack:rw --bind ${STACK_PATH}:/stack:rw
# ------------------------------------------------------------------------------
spack:setup:
stage: environment
extends:
- .parallel_job
- .setup_spack
script:
- >
if [ ! -d /buildcache/build_cache ]; then
/opt/spack/bin/spack gpg publish -d /buildcache
- SPACK_VERSION=$(jq .spack.version config.json)
- |
if [ ! -d /spack/spack ]; then
git clone https://github.com/spack/spack.git -b $SPACK_VERSION /spack/spack
else
cd /spack/spack
git fetch
git checkout $SPACK_VERSION
fi
- /spack/spack/bin/spack gpg trust $GPG_PRIVATE_KEY
- |
mkdir -p /stack/extra_repos/
EXTERNAL_REPOS=$(jq '.spack.repos | .[]' config.json)
for repo in ${EXTERNAL_REPOS}
do
if [ ! -d /stack/extra_repos/${repo} ]; then
git clone -b $(jq ".spack.repos.${repos}.branch" config.json) $(jq ".spack.repos.${repos}.url" config.json) /stack/extra_repos/$repo
else
cd /stack/extra_repos/$repo
git fetch
git checkout $(jq ".spack.repos.${repos}.branch" config.json)
fi
done
- if [ ! -d /buildcache/build_cache ]; then
/spack/spack/bin/spack gpg publish -d /buildcache
fi
spack:concretize:
stage: concretize
extends:
- .parallel_job
- .setup_spack
script:
- /opt/spack/bin/spack -e . concretize
- /spack/spack/bin/spack -e . concretize
needs:
- job: spack:setup
artifacts:
......
{
"spack": {
"version": "v0.21.1",
"repos": {
"scitas-externals": {
"url": "https://gitlab.epfl.ch/SCITAS/software-stack/spack-repo-externals.git",
"branch": "release/syrah"
},
"sctias-packages": {
"url": "https://gitlab.epfl.ch/SCITAS/software-stack/spack-repo-externals.git",
"branch": "release/syrah"
}
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment