diff --git a/.travis.yml b/.travis.yml index f38fb22b3..3a57d77cc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,13 +4,7 @@ language: generic install: # We do this conditionally because it saves us some downloading if the # version is the same. - - wget https://repo.continuum.io/miniconda/Miniconda3-4.5.12-Linux-x86_64.sh -O miniconda.sh; - - bash miniconda.sh -b -p $HOME/miniconda - - source "$HOME/miniconda/etc/profile.d/conda.sh" - - hash -r - - conda config --set always_yes yes --set changeps1 no - # Useful for debugging any issues with conda - - conda info -a + - source setup/setup_conda.sh services: - mongodb script: diff --git a/setup/setup.sh b/setup/setup.sh index 06049a5ce..855161719 100755 --- a/setup/setup.sh +++ b/setup/setup.sh @@ -1,4 +1,3 @@ - # If the conda binary is not found, specify the full path to it # you can find it by searching for "conda" under the miniconda3 directory # typical paths are: @@ -6,6 +5,16 @@ # - on OSX: /Users//miniconda3/bin/conda # - on Windows: C:/Users//Miniconda3/Scripts/conda +CURR_CONDA_VER=`conda --version | cut -d " " -f 2` +EXP_CONDA_VER=4.5.12 + +if [ $CURR_CONDA_VER == $EXP_CONDA_VER ]; then + echo "For conda, found $CURR_CONDA_VER, expected $EXP_CONDA_VER, all is good!" +else + echo "For conda, found $CURR_CONDA_VER, expected $EXP_CONDA_VER, run setup/setup_conda.sh to get the correct version" + exit 1 +fi + echo "Setting up blank environment" conda create --name emission python=3.6 source activate emission diff --git a/setup/setup_conda.sh b/setup/setup_conda.sh new file mode 100644 index 000000000..b07cd4a2a --- /dev/null +++ b/setup/setup_conda.sh @@ -0,0 +1,9 @@ +EXP_CONDA_VER=4.5.12 + +wget https://repo.continuum.io/miniconda/Miniconda3-$EXP_CONDA_VER-Linux-x86_64.sh -O miniconda.sh; +bash miniconda.sh -b -p $HOME/miniconda +source "$HOME/miniconda/etc/profile.d/conda.sh" +hash -r +conda config --set always_yes yes --set changeps1 no +# Useful for debugging any issues with conda +conda info -a diff --git a/setup/teardown_conda.sh b/setup/teardown_conda.sh new file mode 100644 index 000000000..890b9e922 --- /dev/null +++ b/setup/teardown_conda.sh @@ -0,0 +1 @@ +rm -rf $HOME/miniconda