提交 7defa656 authored 作者: notoraptor's avatar notoraptor

Some corrections

and code simplification.
上级 113d3a9b
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
sudo: false sudo: false
cache: cache:
directories: directories:
- $HOME/download # Sufficient to add miniconda.sh to TRAVIS cache.
- $HOME/.cache/pip - $HOME/.cache/pip
- $HOME/.theano - $HOME/.theano
- $HOME/download # Sufficient to add miniconda.sh to TRAVIS cache.
- $HOME/miniconda2 # Add the installation to TRAVIS cache. - $HOME/miniconda2 # Add the installation to TRAVIS cache.
...@@ -19,7 +19,7 @@ python: ...@@ -19,7 +19,7 @@ python:
# some codes have been moved to separate files # some codes have been moved to separate files
# to better handle if-else shell syntax # to better handle if-else shell syntax
# for multiple lines. New files are in # for multiple lines. New files are in
# new .travis folder added. # new folder ".travis".
# command to install dependencies # command to install dependencies
before_install: before_install:
......
...@@ -5,6 +5,8 @@ if test -e $HOME/miniconda2/bin ; then ...@@ -5,6 +5,8 @@ if test -e $HOME/miniconda2/bin ; then
else else
echo "Installing miniconda." echo "Installing miniconda."
rm -rf $HOME/miniconda2 rm -rf $HOME/miniconda2
mkdir -p $HOME/download
if [[ -d $HOME/download/miniconda.sh ]] ; then rm -rf $HOME/download/miniconda.sh ; fi
wget -c https://repo.continuum.io/miniconda/Miniconda2-4.1.11-Linux-x86_64.sh -O $HOME/download/miniconda.sh wget -c https://repo.continuum.io/miniconda/Miniconda2-4.1.11-Linux-x86_64.sh -O $HOME/download/miniconda.sh
chmod +x $HOME/download/miniconda.sh chmod +x $HOME/download/miniconda.sh
$HOME/download/miniconda.sh -b $HOME/download/miniconda.sh -b
......
...@@ -2,12 +2,12 @@ ...@@ -2,12 +2,12 @@
# In Python 3.3, we test the min version of NumPy and SciPy. In Python 2.7, we test more recent version. # In Python 3.3, we test the min version of NumPy and SciPy. In Python 2.7, we test more recent version.
if test -e $HOME/miniconda2/envs/pyenv ; then if test -e $HOME/miniconda2/envs/pyenv ; then
echo "pyenv already exists." echo "pyenv already exists."
source activate pyenv
if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then conda install mkl python=2.7 numpy=1.9.1 scipy=0.14.0 nose=1.3.0 pip flake8=2.3 six=1.9.0 pep8=1.6.2 pyflakes=0.8.1 sphinx mkl-service libgfortran=1; fi
if [[ $TRAVIS_PYTHON_VERSION == '3.3' ]]; then conda install mkl python=3.3 numpy=1.9.1 scipy=0.14.0 nose=1.3.4 pip flake8=2.3 six=1.9.0 pep8=1.6.2 pyflakes=0.8.1 sphinx mkl-service; fi
source deactivate
else else
echo "Creating pyenv." echo "Creating pyenv."
if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then conda create --yes -q -n pyenv mkl python=2.7 numpy=1.9.1 scipy=0.14.0 nose=1.3.0 pip flake8=2.3 six=1.9.0 pep8=1.6.2 pyflakes=0.8.1 sphinx mkl-service libgfortran=1; fi conda create --yes -q -n pyenv
if [[ $TRAVIS_PYTHON_VERSION == '3.3' ]]; then conda create --yes -q -n pyenv mkl python=3.3 numpy=1.9.1 scipy=0.14.0 nose=1.3.4 pip flake8=2.3 six=1.9.0 pep8=1.6.2 pyflakes=0.8.1 sphinx mkl-service; fi
fi fi
source activate pyenv
if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then conda install mkl python=2.7 numpy=1.9.1 scipy=0.14.0 nose=1.3.0 pip flake8=2.3 six=1.9.0 pep8=1.6.2 pyflakes=0.8.1 sphinx mkl-service libgfortran=1; fi
if [[ $TRAVIS_PYTHON_VERSION == '3.3' ]]; then conda install mkl python=3.3 numpy=1.9.1 scipy=0.14.0 nose=1.3.4 pip flake8=2.3 six=1.9.0 pep8=1.6.2 pyflakes=0.8.1 sphinx mkl-service; fi
source deactivate
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论