Skip to content

Commit 37ab577

Browse files
committed
Reworking spack setup
Using the or-fusion-spack-repo repository to define packages
1 parent 4138c10 commit 37ab577

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

Diff for: build.sh

+14-5
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,16 @@ echo "SPACK_HOME=${SPACK_HOME}"
6767
if [[ "${spack_reinstall}" -eq 1 ]]; then
6868
\rm -Rf ${SPACK_HOME}
6969
fi
70+
if [[ "$spack_dev" -eq 0 ]]; then
71+
\rm -Rf _spack_tpls
72+
git clone https://github.com/or-fusion/or-fusion-spack-repo.git _spack_tpls
73+
else
74+
git clone [email protected]:or-fusion/or-fusion-spack-repo.git _spack_tpls
75+
cd _spack_tpls
76+
git checkout dev
77+
git pull
78+
cd ..
79+
fi
7080
\rm -Rf _build
7181
#
7282
# Configure gurobi
@@ -94,17 +104,16 @@ else
94104
echo ""
95105
echo "Installing Coek dependencies using Spack"
96106
echo ""
97-
if [[ "$spack_dev" -eq 0 ]]; then
98-
git clone https://github.com/or-fusion/spack.git ${SPACK_HOME}
99-
else
100-
git clone [email protected]:or-fusion/spack.git ${SPACK_HOME}
101-
fi
107+
git clone https://github.com/spack/spack.git ${SPACK_HOME}
102108
. ${SPACK_HOME}/share/spack/setup-env.sh
109+
spack repo add _spack_tpls/repo
110+
spack repo list
103111
spack env create coekenv
104112
spack env activate coekenv
105113
spack add asl cppad fmt rapidjson catch2 highs $with_valgrind
106114
spack install
107115
spack env deactivate
116+
spack repo remove _spack_tpls/repo
108117
fi
109118
if test -d ${SPACK_HOME}; then
110119
export SPACK_HOME=$(cd ${SPACK_HOME}; pwd)

0 commit comments

Comments
 (0)