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

Separating the build caches per environment

parent c6ac451a
No related branches found
No related tags found
No related merge requests found
...@@ -35,6 +35,7 @@ srun ${srun_options} --pty apptainer run \ ...@@ -35,6 +35,7 @@ srun ${srun_options} --pty apptainer run \
--bind ${CI_DATA_LT}/squashfs-cache/:/squashfs-cache \ --bind ${CI_DATA_LT}/squashfs-cache/:/squashfs-cache \
--bind ${CI_DATA_ST}/overlayfs:/overlayfs \ --bind ${CI_DATA_ST}/overlayfs:/overlayfs \
--bind ${CI_DATA_ST}/deconcretize:/deconcretize \ --bind ${CI_DATA_ST}/deconcretize:/deconcretize \
--env LC_ALL=C.UTF-8 \
--env PYTHONUNBUFFERED=1 \ --env PYTHONUNBUFFERED=1 \
--env stack=${stack} \ --env stack=${stack} \
--env environment=${environment} \ --env environment=${environment} \
......
...@@ -32,7 +32,7 @@ ${STACK_LOCATION}/spack/bin/spack \ ...@@ -32,7 +32,7 @@ ${STACK_LOCATION}/spack/bin/spack \
buildcache create \ buildcache create \
--update-index \ --update-index \
--key ${GPG_KEY_ID} \ --key ${GPG_KEY_ID} \
${MOUNT_POINT}/buildcache ${MOUNT_POINT}/buildcache/$environment
echo "Checking ${STACK_CONFIG_PATH}/mark_explicit_${environment} for spec to mark explicit" echo "Checking ${STACK_CONFIG_PATH}/mark_explicit_${environment} for spec to mark explicit"
if [ -e ${STACK_CONFIG_PATH}/mark_explicit_${environment} ] if [ -e ${STACK_CONFIG_PATH}/mark_explicit_${environment} ]
......
...@@ -61,7 +61,7 @@ for c in "core_compilers" "compilers"; do ...@@ -61,7 +61,7 @@ for c in "core_compilers" "compilers"; do
buildcache create \ buildcache create \
--update-index \ --update-index \
--key ${GPG_KEY_ID} \ --key ${GPG_KEY_ID} \
${MOUNT_POINT}/buildcache ${hashes} ${MOUNT_POINT}/buildcache/${environment} ${hashes}
for compiler_hash in $(echo ${hashes}); do for compiler_hash in $(echo ${hashes}); do
location=$(${STACK_LOCATION}/spack/bin/spack location -i ${compiler_hash}) location=$(${STACK_LOCATION}/spack/bin/spack location -i ${compiler_hash})
......
...@@ -9,7 +9,7 @@ mkdir -p ${CI_DATA_ST}/overlayfs ...@@ -9,7 +9,7 @@ mkdir -p ${CI_DATA_ST}/overlayfs
mkdir -p ${CI_DATA_ST}/homes mkdir -p ${CI_DATA_ST}/homes
mkdir -p ${CI_DATA_ST}/deconcretize mkdir -p ${CI_DATA_ST}/deconcretize
for i in squashfs-cache buildcache spack-mirror for i in squashfs-cache buildcache/$environment spack-mirror
do do
if [ ! -e ${CI_DATA_LT}/$i ] if [ ! -e ${CI_DATA_LT}/$i ]
then then
......
...@@ -172,9 +172,9 @@ echo "Setting up buildcache" ...@@ -172,9 +172,9 @@ echo "Setting up buildcache"
spack/bin/spack gpg trust \ spack/bin/spack gpg trust \
$GPG_PRIVATE_KEY $GPG_PRIVATE_KEY
if [ ! -d ${MOUNT_POINT}/buildcache/build_cache ]; then if [ ! -d ${MOUNT_POINT}/buildcache/${environment}/build_cache ]; then
spack/bin/spack gpg publish \ spack/bin/spack gpg publish \
-d ${MOUNT_POINT}/buildcache -d ${MOUNT_POINT}/buildcache/${environment}
fi fi
if ! spack/bin/spack mirror list | grep buildcache; then if ! spack/bin/spack mirror list | grep buildcache; then
...@@ -182,11 +182,9 @@ if ! spack/bin/spack mirror list | grep buildcache; then ...@@ -182,11 +182,9 @@ if ! spack/bin/spack mirror list | grep buildcache; then
spack/bin/spack mirror add \ spack/bin/spack mirror add \
--type binary \ --type binary \
--scope system \ --scope system \
buildcache file://${MOUNT_POINT}/buildcache buildcache file://${MOUNT_POINT}/buildcache/${environment}
fi fi
spack/bin/spack buildcache keys \ spack/bin/spack buildcache keys \
--install \ --install \
--trust --trust
#spack/bin/spack buildcache update-index /buildcache
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