Skip to content

Commit

Permalink
Re-enable caching of NEURON build
Browse files Browse the repository at this point in the history
  • Loading branch information
apdavison committed Oct 26, 2021
1 parent f785944 commit 94053a3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
5 changes: 2 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ matrix:
- python: 3.9
env: PYENV=py39
before_install:
- sudo apt-get install -y libgsl0-dev openmpi-bin libopenmpi-dev python-dev
- sudo apt-get install -y libgsl0-dev openmpi-bin libopenmpi-dev python-dev
install:
- source ci/install.sh
script: bash ci/test_script.sh
Expand All @@ -18,7 +18,6 @@ after_success:
cache:
directories:
- $HOME/nest-2.20.0
- $HOME/nrn-7.7
- $HOME/nrn-8.0.0
- $HOME/build/nest-2.20.0
- $HOME/build/nrn-7.7
- $HOME/.cache/pip
19 changes: 13 additions & 6 deletions ci/install_neuron.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,21 @@ 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"
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/$NRN_VERSION/build/config.log" ]; then

cmake .. -DNRN_ENABLE_INTERVIEWS=OFF -DNRN_ENABLE_MPI=ON -DNRN_ENABLE_RX3D=OFF -DCMAKE_INSTALL_PREFIX=$VENV;
cmake --build . --target install
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)"`

cmake .. -DNRN_ENABLE_INTERVIEWS=OFF -DNRN_ENABLE_MPI=ON -DNRN_ENABLE_RX3D=OFF -DCMAKE_INSTALL_PREFIX=$VENV
cmake --build . --target install
ls
else
echo 'Using cached NEURON build directory.'
fi

pip install nrnutils # must be installed after NEURON

Expand Down

0 comments on commit 94053a3

Please sign in to comment.