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

Ensuring gcc comes first

parent 0693153f
No related branches found
No related tags found
1 merge request!5Adding nvhpc to kuma
......@@ -15,8 +15,7 @@ _compilers=$(jq -Mrc '.stack
| select((.constraint == null) or (.constraint? | index(env.environment)))
' ${STACK_CONFIG})
compilers_names=$(echo ${_compilers} | jq -Mrc '. | "\(.name)"')
compilers_names="gcc $(echo ${_compilers} | jq -Mrs '. | map("\(.name)") | .[]' | egrep -v '^gcc$')"
for name in ${compilers_names}
do
......
......@@ -15,8 +15,7 @@ _compilers=$(jq -Mrc '.stack
| select((.constraint == null) or (.constraint? | index(env.environment)))
' ${STACK_CONFIG})
compilers_names=$(echo ${_compilers} | jq -Mrc '. | "\(.name)"')
compilers_names="gcc $(echo ${_compilers} | jq -Mrs '. | map("\(.name)") | .[]' | egrep -v '^gcc$')"
for name in ${compilers_names}
do
......
......@@ -200,8 +200,6 @@ spack/bin/spack \
--install \
--trust
_compilers=$(jq -Mrc '.stack
| .system_arch as $arch
| .compilers
......@@ -211,7 +209,7 @@ _compilers=$(jq -Mrc '.stack
| select((.constraint == null) or (.constraint? | index(env.environment)))
' ${STACK_CONFIG})
compilers_names=$(echo ${_compilers} | jq -Mrc '. | "\(.name)"')
compilers_names="$(echo ${_compilers} | jq -Mrs '. | map("\(.name)") | .[]' | egrep -v '^gcc$')"
echo "List compilers:"
echo ${_compilers} | jq -C '.'
......@@ -220,29 +218,26 @@ main_env_path=${STACK_LOCATION}/spack/var/spack/environments/${environment}
for name in ${compilers_names}
do
if [ "$name" != "gcc" ]
then
source ${CI_PROJECT_DIR}/ci/stack_env.sh ${name}
echo "Configure compiler environment for ${name}"
if [ ! -e ${SPACK_SYSTEM_CONFIG_PATH} ]
then
echo "${SPACK_SYSTEM_CONFIG_PATH} does not exist, creating env"
${STACK_LOCATION}/spack/bin/spack --color=always env create --without-view ${full_environment}
fi
if [ ${SPACK_SYSTEM_CONFIG_PATH} != ${main_env_path} ]
then
for file in mirrors packages concretizer config definitions modules repos
do
cp ${main_env_path}/${file}*.yaml ${SPACK_SYSTEM_CONFIG_PATH}
done
fi
if [ -e ${STACK_CONFIG_PATH}/spack_${name}.yaml ]
then
cp ${STACK_CONFIG_PATH}/spack_${name}.yaml ${SPACK_SYSTEM_CONFIG_PATH}/spack.yaml
fi
fi
source ${CI_PROJECT_DIR}/ci/stack_env.sh ${name}
echo "Configure compiler environment for ${name}"
if [ ! -e ${SPACK_SYSTEM_CONFIG_PATH} ]
then
echo "${SPACK_SYSTEM_CONFIG_PATH} does not exist, creating env"
${STACK_LOCATION}/spack/bin/spack --color=always env create --without-view ${full_environment}
fi
if [ ${SPACK_SYSTEM_CONFIG_PATH} != ${main_env_path} ]
then
for file in mirrors packages concretizer config definitions modules repos
do
cp ${main_env_path}/${file}*.yaml ${SPACK_SYSTEM_CONFIG_PATH}
done
fi
if [ -e ${STACK_CONFIG_PATH}/spack_${name}.yaml ]
then
cp ${STACK_CONFIG_PATH}/spack_${name}.yaml ${SPACK_SYSTEM_CONFIG_PATH}/spack.yaml
fi
done
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