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

New tentative with cache paths

parent c8da0c8f
No related branches found
No related tags found
No related merge requests found
Pipeline #194497 failed
......@@ -53,7 +53,9 @@ variables:
cache:
key: ${environment}-spack-cache
policy: pull-push
untracked: true
paths:
- stack
# ------------------------------------------------------------------------------
# ------------------------------------------------------------------------------
spack:checkout:
......@@ -102,6 +104,7 @@ spack:concretize:
- .parallel_job
script:
- source stack_env.sh
- cd ${STACK_LOCATION}/${stack}
- spack/bin/spack -e ${SPACK_SYSTEM_CONFIG_PATH} config blame
- spack/bin/spack -e ${SPACK_SYSTEM_CONFIG_PATH} concretize
needs:
......@@ -118,6 +121,7 @@ spack:install:
- .parallel_job
script:
- source stack_env.sh
- cd ${STACK_LOCATION}/${stack}
- spack/bin/spack -e ${SPACK_SYSTEM_CONFIG_PATH} install
--log-file spack-install.xml
--log-format junit
......@@ -130,7 +134,7 @@ spack:install:
/buildcache
after_script:
- if [ ! -e spack-install.xml ]; then
echo "{}" > spack-install.xml
echo "{}" > spack-install.xml
fi
needs:
- job: spack:concretize
......
......@@ -6,8 +6,10 @@ set -o nounset
source ${CI_PROJECT_DIR}/ci/stack_env.sh
export spack_location=${STACK_LOCATION}/${stack}
echo "Getting system compiler"
${STACK_LOCATION}/spack/bin/spack compiler find --scope system /usr
${spack_location}/spack/bin/spack compiler find --scope system /usr
for c in "core_compilers" "compilers"; do
echo "Installing $c"
......@@ -17,14 +19,14 @@ for c in "core_compilers" "compilers"; do
echo "${_specs}"
if [ "x${_specs}" != "x" ]; then
${STACK_LOCATION}/spack/bin/spack spec \
${spack_location}/spack/bin/spack spec \
--install-status \
--namespaces \
--long \
--types \
${_specs}
${STACK_LOCATION}/spack/bin/spack spec \
${spack_location}/spack/bin/spack spec \
--install-status \
--namespaces \
--long \
......@@ -32,7 +34,7 @@ for c in "core_compilers" "compilers"; do
--json \
${_specs} > compilers_spec.json
${STACK_LOCATION}/spack/bin/spack install \
${spack_location}/spack/bin/spack install \
--log-file spack-install.xml \
--log-format junit \
--fail-fast \
......@@ -42,20 +44,20 @@ for c in "core_compilers" "compilers"; do
hashes=$(jq -Mr '.spec.nodes | map("/\(.hash)") | join(" ")' compilers_spec.json)
echo "Adding packages to buildcache"
${STACK_LOCATION}/spack/bin/spack buildcache create \
${spack_location}/spack/bin/spack buildcache create \
--update-index \
--key EDC904DCE3D2E84E \
/buildcache ${hashes}
for compiler_hash in $(echo ${hashes}); do
location=$(${STACK_LOCATION}/spack/bin/spack location -i ${compiler_hash})
location=$(${spack_location}/spack/bin/spack location -i ${compiler_hash})
# echo "Checking for compiler"
# echo " - ${location}"
# echo " - ${location}/compiler/latest"
# echo " - ${location}/compiler/latest/linux"
# echo " - ${location}/Linux_x86_64/2024/compilers"
${STACK_LOCATION}/spack/bin/spack compiler find \
${spack_location}/spack/bin/spack compiler find \
--scope system \
${location} \
${location}/compiler/latest \
......
......@@ -7,7 +7,7 @@ set -o nounset
source ${CI_PROJECT_DIR}/ci/stack_env.sh
mkdir -p ${STACK_LOCATION}
cd ${STACK_LOCATION}
cd ${STACK_LOCATION}/${stack}
echo "Setting up spack"
if [ ! -d spack/.git ]; then
......
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