diff --git a/.travis.yml b/.travis.yml index 5d2183749c..49477bea6e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,10 @@ python: - "3.6" - "3.5" +env: + - PYSTAN_VERSION=2.17 + - PYSTAN_VERSION=latest + addons: apt_packages: - pandoc diff --git a/scripts/create_testenv.sh b/scripts/create_testenv.sh index 665f84e037..01684fec4d 100755 --- a/scripts/create_testenv.sh +++ b/scripts/create_testenv.sh @@ -9,9 +9,10 @@ command -v conda >/dev/null 2>&1 || { # if no python specified, use Travis version, or else 3.6 PYTHON_VERSION=${PYTHON_VERSION:-${TRAVIS_PYTHON_VERSION:-3.6}} +PYSTAN_VERSION=${PYSTAN_VERSION:-latest} if [[ $* != *--global* ]]; then - ENVNAME="testenv${PYTHON_VERSION}" + ENVNAME="testenv${PYTHON_VERSION}_PYSTAN${PYSTAN_VERSION}" if conda env list | grep -q ${ENVNAME} then @@ -31,6 +32,12 @@ else pip install http://download.pytorch.org/whl/cpu/torch-0.4.1-cp36-cp36m-linux_x86_64.whl fi +if [ "$PYSTAN_VERSION" = "latest" ]; then + pip install pystan +else + pip install pystan==${PYSTAN_VERSION} +fi + conda install --yes numpy cython scipy pandas matplotlib pytest pylint sphinx numpydoc ipython xarray netcdf4 mkl-service pip install --upgrade pip