Skip to content
Snippets Groups Projects
Commit d4aeb24d authored by Eric Müller's avatar Eric Müller :mountain_bicyclist:
Browse files

fix(50%): move generated files to /tmp

This is not how this should be done in the end… we should use mktemp
to generate unique and fresh temp files.
For now this restores functionality to build from r/o folders.
parent d7eaa894
No related branches found
No related tags found
2 merge requests!651create new experimental release,!624feat(CI): introduce support for container builds
Pipeline #58974 failed with stage
in 2 hours, 25 minutes, and 23 seconds
......@@ -92,7 +92,7 @@ then
spack compiler find
spack load $EBRAINS_SPACK_COMPILER || {
# dump dag to file
spack spec -y $EBRAINS_SPACK_COMPILER arch=x86_64 > "req_compiler.yaml"
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 \
......@@ -100,14 +100,14 @@ then
--remote-cache-type=oci \
--remote-cache=${OCI_CACHE_PREFIX}/source_cache \
--yashchiki-home=${YASHCHIKI_HOME} \
compiler_missing_paths_sources.dat req_compiler.yaml
/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} \
compiler_missing_paths_buildresults.dat req_compiler.yaml
/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
......@@ -116,7 +116,7 @@ then
--local-cache=${SPACK_CACHE_SOURCE} \
--remote-cache-type=oci \
--remote-cache=${OCI_CACHE_PREFIX}/source_cache \
compiler_missing_paths_sources.dat
/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
......@@ -125,7 +125,7 @@ then
--local-cache=${SPACK_CACHE_BUILD}/build_cache \
--remote-cache-type=oci \
--remote-cache=${OCI_CACHE_PREFIX}/build_cache \
compiler_missing_paths_buildresults.dat
/tmp/compiler_missing_paths_buildresults.dat
fi
spack load $EBRAINS_SPACK_COMPILER
}
......@@ -159,14 +159,14 @@ if [ -n "${OCI_CACHE_PREFIX}" ]; then
--remote-cache-type=oci \
--remote-cache=${OCI_CACHE_PREFIX}/source_cache \
--yashchiki-home=${YASHCHIKI_HOME} \
missing_paths_sources.dat ${CACHE_SPECFILE}
/tmp/missing_paths_sources.dat ${CACHE_SPECFILE}
# 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} \
missing_paths_buildresults.dat ${CACHE_SPECFILE}
/tmp/missing_paths_buildresults.dat ${CACHE_SPECFILE}
fi
spack-python -c "exit(not len(spack.environment.active_environment().uninstalled_specs()))" && (
# fetch all sources but delay exit code handling
......@@ -178,7 +178,7 @@ spack-python -c "exit(not len(spack.environment.active_environment().uninstalled
--local-cache=${SPACK_CACHE_SOURCE} \
--remote-cache-type=oci \
--remote-cache=${OCI_CACHE_PREFIX}/source_cache \
missing_paths_sources.dat;
/tmp/missing_paths_sources.dat;
else
echo "Updating of the source cache disabled."
fi
......@@ -213,7 +213,7 @@ if [ -n "${OCI_CACHE_PREFIX}" ] && [ "${UPDATE_SPACK_OCI_CACHES:-false}" = "true
--local-cache=${SPACK_CACHE_BUILD}/build_cache \
--remote-cache-type=oci \
--remote-cache=${OCI_CACHE_PREFIX}/build_cache \
missing_paths_buildresults.dat
/tmp/missing_paths_buildresults.dat
else
echo "Updating of the build cache disabled."
fi
......
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