Skip to content

Commit

Permalink
Try to build NEURON using cmake on Travis
Browse files Browse the repository at this point in the history
  • Loading branch information
apdavison committed Oct 26, 2021
1 parent efb8e80 commit f785944
Showing 1 changed file with 7 additions and 23 deletions.
30 changes: 7 additions & 23 deletions ci/install_neuron.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,18 @@ set -e # stop execution in case of errors
if [ "$TRAVIS_PYTHON_VERSION" == "3.9" ]; then
echo -e "\n========== Installing NEURON ==========\n"
export NRN_VERSION="nrn-8.0.0"
if [ ! -f "$HOME/$NRN_VERSION/configure" ]; then
wget https://neuron.yale.edu/ftp/neuron/versions/v8.0/8.0.0/8.0.0.tar.gz -O $HOME/$NRN_VERSION.tar.gz;
pushd $HOME;
tar xzf $NRN_VERSION.tar.gz;
popd;
else
echo 'Using cached version of NEURON sources.';
fi
mkdir -p $HOME/build/$NRN_VERSION
pushd $HOME/build/$NRN_VERSION
git clone https://github.com/neuronsimulator/nrn -b 8.0.0 $HOME/$NRN_VERSION

mkdir -p $HOME/$NRN_VERSION/build
pushd $HOME/$NRN_VERSION/build
export VENV=`python -c "import sys; print(sys.prefix)"`;
if [ ! -f "$HOME/build/$NRN_VERSION/config.log" ]; then
$HOME/$NRN_VERSION/configure --with-paranrn --with-nrnpython=$VENV/bin/python --prefix=$VENV --disable-rx3d --without-iv;
make;
else
echo 'Using cached NEURON build directory.';
fi
make install
cd src/nrnpython
python setup.py install

cmake .. -DNRN_ENABLE_INTERVIEWS=OFF -DNRN_ENABLE_MPI=ON -DNRN_ENABLE_RX3D=OFF -DCMAKE_INSTALL_PREFIX=$VENV;
cmake --build . --target install

pip install nrnutils # must be installed after NEURON

# compile PyNN NMODL mechanisms
cd $VENV/bin;
ls -l;
ln -sf ../x86_64/bin/nrnivmodl;

echo $TRAVIS_BUILD_DIR
cd $TRAVIS_BUILD_DIR/pyNN/neuron/nmodl
nrnivmodl
Expand Down

0 comments on commit f785944

Please sign in to comment.