From ca5bdd3ef09674a8f984c43e80cb9631a2b398f5 Mon Sep 17 00:00:00 2001 From: Eleni Mathioulaki <emathioulaki@athenarc.gr> Date: Tue, 4 Mar 2025 23:26:20 +0000 Subject: [PATCH] feat(CI): no need for spack-installed compiler on lab image-based builds --- install_spack_env.sh | 46 -------------------------------------------- 1 file changed, 46 deletions(-) diff --git a/install_spack_env.sh b/install_spack_env.sh index 8de4f7df..31232625 100644 --- a/install_spack_env.sh +++ b/install_spack_env.sh @@ -79,52 +79,6 @@ if [[ ! $(spack mirror list | grep local_cache) ]]; then spack mirror add local_cache ${SPACK_CACHE_BUILD} fi -# install platform compiler (extract version from packages.yaml) -if [ $SYSTEMNAME == ebrainslab ] -then - EBRAINS_SPACK_COMPILER=$(grep 'compiler' $EBRAINS_REPO/site-config/$SYSTEMNAME/packages.yaml | awk -F'[][]' '{ print $2 }') - spack compiler find - spack load $EBRAINS_SPACK_COMPILER || { - # dump dag to file - spack spec -y $EBRAINS_SPACK_COMPILER arch=x86_64 > "/tmp/req_compiler.yaml" - if [ -n "${OCI_CACHE_PREFIX}" ]; then - # fetch missing sources (if packages not yet installed) - python3 ${YASHCHIKI_HOME}/fetch_cached_sources.py \ - --local-cache=${SPACK_CACHE_SOURCE} \ - --remote-cache-type=oci \ - --remote-cache=${OCI_CACHE_PREFIX}/source_cache \ - --yashchiki-home=${YASHCHIKI_HOME} \ - /tmp/compiler_missing_paths_sources.dat /tmp/req_compiler.yaml - # fetch missing build results (if packages not yet installed) - python3 ${YASHCHIKI_HOME}/fetch_cached_buildresults.py \ - --local-cache=${SPACK_CACHE_BUILD}/build_cache \ - --remote-cache-type=oci \ - --remote-cache=${OCI_CACHE_PREFIX}/build_cache \ - --yashchiki-home=${YASHCHIKI_HOME} \ - /tmp/compiler_missing_paths_buildresults.dat /tmp/req_compiler.yaml - fi - spack install --no-check-signature -y -j$SPACK_JOBS $EBRAINS_SPACK_COMPILER arch=x86_64 - if [ -n "${OCI_CACHE_PREFIX}" ] && [ "${UPDATE_SPACK_OCI_CACHES:-false}" = "true" ]; then - echo "Performing update of the source cache (for base compiler)" - python3 ${YASHCHIKI_HOME}/update_cached_sources.py \ - --local-cache=${SPACK_CACHE_SOURCE} \ - --remote-cache-type=oci \ - --remote-cache=${OCI_CACHE_PREFIX}/source_cache \ - /tmp/compiler_missing_paths_sources.dat - # push previously missing (but now installed) packages to the local cache - spack buildcache create --unsigned ${SPACK_CACHE_BUILD} ${EBRAINS_SPACK_COMPILER} && ret=$? || ret=$? - # upload packages from local to remote cache - echo "Performing update of the build cache (for base compiler)" - python3 ${YASHCHIKI_HOME}/update_cached_buildresults.py \ - --local-cache=${SPACK_CACHE_BUILD}/build_cache \ - --remote-cache-type=oci \ - --remote-cache=${OCI_CACHE_PREFIX}/build_cache \ - /tmp/compiler_missing_paths_buildresults.dat - fi - spack load $EBRAINS_SPACK_COMPILER - } -fi - spack compiler find # create environment if it does not exist -- GitLab