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

don't directly overwrite spack.yaml (breaks spack command)

parent 500e8be3
No related branches found
No related tags found
No related merge requests found
...@@ -199,7 +199,8 @@ build-spack-env-on-runner: ...@@ -199,7 +199,8 @@ build-spack-env-on-runner:
- spack env create $SPACK_DEV_ENV - spack env create $SPACK_DEV_ENV
- spack env activate $SPACK_DEV_ENV - spack env activate $SPACK_DEV_ENV
- rm -rf $SPACK_ENV/site-config && cp -r site-config $SPACK_ENV - rm -rf $SPACK_ENV/site-config && cp -r site-config $SPACK_ENV
- spack-python site-config/ymerge.py spack.yaml site-config/$SYSTEMNAME/spack.yaml > $SPACK_ENV/spack.yaml - spack-python site-config/ymerge.py spack.yaml site-config/$SYSTEMNAME/spack.yaml > /tmp/spack.yaml
- cp /tmp/spack.yaml $SPACK_ENV/
- spack install -y -j2 --fresh --test root - spack install -y -j2 --fresh --test root
after_script: after_script:
- mkdir spack_logs - mkdir spack_logs
...@@ -274,7 +275,8 @@ sync-gitlab-spack-instance: ...@@ -274,7 +275,8 @@ sync-gitlab-spack-instance:
# update environment site-configs # update environment site-configs
- rm -rf $SPACK_ENV/site-config && cp -r site-config $SPACK_ENV - rm -rf $SPACK_ENV/site-config && cp -r site-config $SPACK_ENV
# update spack.yaml: merge top-level and site-specific spack.yaml files # update spack.yaml: merge top-level and site-specific spack.yaml files
- spack-python site-config/ymerge.py spack.yaml site-config/$SYSTEMNAME/spack.yaml > $SPACK_ENV/spack.yaml - spack-python site-config/ymerge.py spack.yaml site-config/$SYSTEMNAME/spack.yaml > /tmp/spack.yaml
- cp /tmp/spack.yaml $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 # 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 enironment be concretized by the spack install command: # in the issue is to NOT concretize separately, but simply remove the .lock file and let the enironment be concretized by the spack install command:
- rm $SPACK_ROOT/var/spack/environments/$SPACK_NFS_ENV/spack.lock || echo "No spack.lock file" - rm $SPACK_ROOT/var/spack/environments/$SPACK_NFS_ENV/spack.lock || echo "No spack.lock file"
......
...@@ -59,7 +59,8 @@ rm -rf $SPACK_ENV/site-config && cp -r $EBRAINS_REPO/site-config $SPACK_ENV ...@@ -59,7 +59,8 @@ rm -rf $SPACK_ENV/site-config && cp -r $EBRAINS_REPO/site-config $SPACK_ENV
# update spack.yaml: merge top-level and site-specific spack.yaml files # update spack.yaml: merge top-level and site-specific spack.yaml files
# TODO: find a more robust way to do this (maybe with yq? but we need to download the binary) # TODO: find a more robust way to do this (maybe with yq? but we need to download the binary)
# TODO: or add pyyaml to dependencies and use python script # TODO: or add pyyaml to dependencies and use python script
spack-python $EBRAINS_REPO/site-config/ymerge.py $EBRAINS_REPO/spack.yaml $EBRAINS_REPO/site-config/$SYSTEMNAME/spack.yaml > $SPACK_ENV/spack.yaml 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_ENV/
# There is a known spack bug (https://github.com/spack/spack/issues/29447) in installing test dependencies # 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 # for installation tests. The workaround suggested in the issue is to NOT concretize separately, but simply
......
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