-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
46 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,52 +7,59 @@ cmd() { | |
eval "$@" | ||
} | ||
|
||
echo "Setting up packages with spack-manager" | ||
echo "Setting up packages with spack" | ||
|
||
cmd "cd ${HOME}" | ||
if [ ! -d "${HOME}/spack-manager" ]; then | ||
cmd "git clone --recursive git@github.com:sandialabs/spack-manager.git" | ||
if [ ! -d "${HOME}/spack" ]; then | ||
cmd "git clone -c feature.manyFiles=true https://github.com/spack/spack.git" | ||
fi | ||
cmd "export SPACK_MANAGER=${HOME}/spack-manager" | ||
cmd "source ${SPACK_MANAGER}/start.sh" | ||
cmd "export SPACK_DIR=${HOME}/spack" | ||
cmd "source ${SPACK_DIR}/share/spack/setup-env.sh" | ||
|
||
ENV_NAME="prog-utils" | ||
ENV_DIR="${SPACK_MANAGER}/environments/${ENV_NAME}" | ||
MODULE_DIR="${HOME}/modules" | ||
|
||
cmd "mkdir -p ${MODULE_DIR}" | ||
cmd "quick-create -n ${ENV_NAME}" | ||
cmd "quick-activate ${ENV_DIR}" | ||
|
||
# cmd "spack add [email protected]+tls+native+treesitter+json" | ||
cmd "spack add [email protected]+tls+json%gcc" | ||
cmd "spack add ccls%gcc" | ||
|
||
if [ ! -z $(grep -L "modules:" "${ENV_DIR}/spack.yaml") ]; then | ||
echo "Adding modules to spack.yaml" | ||
echo " modules: | ||
default: | ||
roots: | ||
tcl: ${MODULE_DIR} | ||
tcl: | ||
projections: | ||
all: '{compiler.name}-{compiler.version}/{name}/{version}/{hash:4}' | ||
hash_length: 0 | ||
all: | ||
conflict: | ||
- '{name}' | ||
environment: | ||
set: | ||
'{name}_ROOT_DIR': '{prefix}' | ||
include: [emacs, ccls] | ||
exclude: ['%gcc']" >> "${ENV_DIR}/spack.yaml" | ||
fi | ||
ENV_DIR="${SPACK_DIR}/var/spack/environments/${ENV_NAME}" | ||
cmd "spack env activate --create ${ENV_NAME}" | ||
|
||
|
||
cmd "spack add [email protected]+tls+native+treesitter+json%gcc" | ||
# cmd "spack add [email protected]+tls+json%gcc" | ||
# cmd "spack add ccls%gcc" | ||
|
||
cmd "spack concretize -f" | ||
cmd "spack install" | ||
cmd "spack module tcl refresh -y" | ||
cmd "spack env deactivate" | ||
|
||
# MODULE_DIR="${HOME}/modules" | ||
|
||
# cmd "mkdir -p ${MODULE_DIR}" | ||
# cmd "quick-create -n ${ENV_NAME}" | ||
# cmd "quick-activate ${ENV_DIR}" | ||
|
||
|
||
# if [ ! -z $(grep -L "modules:" "${ENV_DIR}/spack.yaml") ]; then | ||
# echo "Adding modules to spack.yaml" | ||
# echo " modules: | ||
# default: | ||
# roots: | ||
# tcl: ${MODULE_DIR} | ||
# tcl: | ||
# projections: | ||
# all: '{compiler.name}-{compiler.version}/{name}/{version}/{hash:4}' | ||
# hash_length: 0 | ||
# all: | ||
# conflict: | ||
# - '{name}' | ||
# environment: | ||
# set: | ||
# '{name}_ROOT_DIR': '{prefix}' | ||
# include: [emacs, ccls] | ||
# exclude: ['%gcc']" >> "${ENV_DIR}/spack.yaml" | ||
# fi | ||
|
||
# cmd "spack concretize -f" | ||
# cmd "spack install" | ||
# cmd "spack module tcl refresh -y" | ||
|
||
cmd "touch ${MODULE_DIR}/linux-centos7-skylake_avx512/gcc-9.3.0/ccls/.version" | ||
cmd "rm -rf ~/.lmod.d/.cache" | ||
# cmd "touch ${MODULE_DIR}/linux-centos7-skylake_avx512/gcc-9.3.0/ccls/.version" | ||
# cmd "rm -rf ~/.lmod.d/.cache" | ||
|
||
{{ end -}} |