Skip to content
Snippets Groups Projects
Commit f4f42e60 authored by Eleni Mathioulaki's avatar Eleni Mathioulaki
Browse files

feat: don't rm spack.lock file

by adding test dependencies in the hash calculation (see ri/tech-hub/platform/esd/spack@01330d63) we can avoid the workaround of removing the lockfile every time before spack install --test root
parent c73f069d
No related branches found
No related tags found
No related merge requests found
......@@ -73,18 +73,12 @@ rm -rf $SPACK_ROOT/var/spack/environments/$EBRAINS_SPACK_ENV/site-config && cp -
spack-python $EBRAINS_REPO/site-config/ymerge.py $EBRAINS_REPO/spack.yaml $EBRAINS_REPO/site-config/$SYSTEMNAME/spack.yaml > /tmp/spack.yaml
cp /tmp/spack.yaml $SPACK_ROOT/var/spack/environments/$EBRAINS_SPACK_ENV/
# There is a known spack bug (https://github.com/spack/spack/issues/29447) in installing test dependencies
# for installation tests. The workaround suggested in the issue is to NOT concretize separately, but simply
# remove the .lock file and let the environment be concretized by the spack install command:
rm $SPACK_ROOT/var/spack/environments/$EBRAINS_SPACK_ENV/spack.lock || echo "No spack.lock file"
# activate environment
spack env activate --without-view $EBRAINS_SPACK_ENV
# fetch all sources
spack concretize --fresh --test root
spack concretize --force --fresh --test root
spack-python -c "exit(not len(spack.environment.active_environment().uninstalled_specs()))" && spack fetch --dependencies --missing
rm $SPACK_ROOT/var/spack/environments/$EBRAINS_SPACK_ENV/spack.lock
# install the environment, use 2 jobs to reduce the amount of required RAM
spack install -y -j2 --fresh --test root
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment