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

Setting stack install location

parent 2c6e9d0e
No related branches found
No related tags found
No related merge requests found
Pipeline #180481 failed
......@@ -35,13 +35,11 @@ variables:
- stack
variables:
COMMAND_OPTIONS_SBATCH: ${slurm_options}
APPTAINER_EXEC_OPTIONS: ${apptainer_options} --bind ${BUILDCACHE}:/buildcache:rw --bind ${STACK_PATH}:/stack:rw --writable-tmpfs
APPTAINER_EXEC_OPTIONS: ${apptainer_options} --bind ${BUILDCACHE}:/buildcache:rw
SPACK_USER_CACHE_PATH: "/tmp/spack_cache_${CI_JOB_ID}"
SPACK_USER_CONFIG_PATH: "/tmp/spack_user_${CI_JOB_ID}"
SPACK_SYSTEM_CONFIG_PATH: "/stack/spack/etc"
BUILDCACHE: "/work/scitas-ge/richart/ci/buildcache"
STACK_PATH: "/work/scitas-ge/richart/ci/${environment}/stack"
.spack_cache:
cache:
......
......@@ -2,6 +2,8 @@
SPACK_VERSION=$(jq -r .spack.version config.json)
STACK_LOCATION=$(jq -r .stack.mount_point config.json)
echo "Setting up spack"
if [ ! -d spack/.git ]; then
git clone https://github.com/spack/spack.git -b $SPACK_VERSION spack
......@@ -14,7 +16,7 @@ fi
cat > spack/etc/spack/config.yaml << EOF
config:
install_tree:
root: /stack/spack/opt/spack
root: ${STACK_LOCATION}/spack/opt/spack
EOF
......@@ -32,7 +34,7 @@ done
echo "Setting up extra repos"
spack_external_repos=/stack/external_repos
spack_external_repos=${STACK_LOCATION}/external_repos
mkdir -p ${spack_external_repos}
if [ ! -e ${SPACK_SYSTEM_CONFIG_PATH}/repos.yaml ]; then
......@@ -62,18 +64,18 @@ echo "Setting up buildcache"
spack/bin/spack gpg trust \
$GPG_PRIVATE_KEY
spack/bin/spack mirror add \
--type binary \
--scope system \
buildcache file:///buildcache
if [ ! -d /buildcache/build_cache ]; then
spack/bin/spack gpg publish \
-d /buildcache
fi
spack/bin/spack mirror add \
--type binary \
--scope system \
buildcache file:///buildcache
spack/bin/spack buildcache keys \
--install \
--trust
spack/bin/spack buildcache update-index /buildcache
#spack/bin/spack buildcache update-index /buildcache
......@@ -13,6 +13,7 @@
}
},
"stack": {
"mount_point": "/stack",
"core_compiler": "gcc@11.4.1 arch=linux-rhel9-x86_64_v2",
"compilers": {
"gcc": { "spec": "gcc", "version": "12.2.0" },
......
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