mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-10 09:06:28 +08:00
ddef107fa1
Anaconda doesn't have windows builds for scipy 0.18 (nor does conda-forge.)
70 lines
3.2 KiB
YAML
70 lines
3.2 KiB
YAML
language: python
|
|
sudo: false
|
|
fast_finish: true
|
|
python:
|
|
- 2.7
|
|
- 3.4
|
|
env:
|
|
global:
|
|
# ANACONDA_TOKEN with api:write
|
|
- secure: "RJJjjQloUjCSkhII93QM+YAsr6YYq7hPFvlbnT07ogn1NeUPsVCyJ97oiZfKtPgdbd24hdQP/CHfB0HgTTES8n996tN3QWc4hZj0e10kFyIlas9qnkrRYRR1jxGShBDXrLdx/tGh8z1qnnCm1fy+fDhAF7Zerouwy4EA2YEzxdE="
|
|
matrix:
|
|
- NUMPY_VERSION=1.11.1 SCIPY_VERSION=0.17.1
|
|
cache:
|
|
directories:
|
|
- $HOME/.cache/.pip/
|
|
|
|
before_install:
|
|
- if [ ${TRAVIS_PYTHON_VERSION:0:1} == "2" ]; then wget https://repo.continuum.io/miniconda/Miniconda-3.7.0-Linux-x86_64.sh -O miniconda.sh; else wget https://repo.continuum.io/miniconda/Miniconda3-3.7.0-Linux-x86_64.sh -O miniconda.sh; fi
|
|
- chmod +x miniconda.sh
|
|
- ./miniconda.sh -b -p $HOME/miniconda
|
|
- export PATH="$HOME/miniconda/bin:$PATH"
|
|
install:
|
|
- conda install conda=4.1.11 conda-build=1.21.11 anaconda-client=1.5.1 --yes
|
|
|
|
- TALIB_VERSION=$(cat ./etc/requirements_talib.txt | sed "s/TA-Lib==\(.*\)/\1/")
|
|
- conda create -n testenv --yes -c quantopian pip python=$TRAVIS_PYTHON_VERSION numpy=$NUMPY_VERSION scipy=$SCIPY_VERSION libgfortran=3.0 ta-lib=$TALIB_VERSION
|
|
- source activate testenv
|
|
- IFS='.' read -r -a NPY_VERSION_ARR <<< "$NUMPY_VERSION"
|
|
- CONDA_NPY=${NPY_VERSION_ARR[0]}${NPY_VERSION_ARR[1]}
|
|
- CONDA_PY=$TRAVIS_PYTHON_VERSION
|
|
- CACHE_DIR="$HOME/.cache/.pip/pip_np""$CONDA_NPY"
|
|
- pip install --upgrade pip coverage coveralls --cache-dir=$CACHE_DIR
|
|
- pip install -r etc/requirements.txt --cache-dir=$CACHE_DIR
|
|
- pip install -r etc/requirements_dev.txt --cache-dir=$CACHE_DIR
|
|
- pip install -r etc/requirements_blaze.txt --cache-dir=$CACHE_DIR # this uses git requirements right now
|
|
- pip install -r etc/requirements_talib.txt --cache-dir=$CACHE_DIR
|
|
- pip install -e .[all] --cache-dir=$CACHE_DIR
|
|
before_script:
|
|
- pip freeze | sort
|
|
script:
|
|
- flake8 zipline tests
|
|
- nosetests --with-coverage
|
|
# deactive env to get access to anaconda command
|
|
- source deactivate
|
|
- if [[ "$TRAVIS_SECURE_ENV_VARS" = "true" && "$TRAVIS_BRANCH" = "master" && "$TRAVIS_PULL_REQUEST" = "false" ]]; then DO_UPLOAD="true"; else DO_UPLOAD="false"; fi
|
|
- |
|
|
for recipe in $(ls -d conda/*/ | xargs -I {} basename {}); do
|
|
if [[ "$recipe" = "zipline" ]]; then continue; fi
|
|
|
|
conda build conda/$recipe --python=$CONDA_PY --numpy=$CONDA_NPY --skip-existing -c quantopian -c https://conda.anaconda.org/quantopian/label/ci
|
|
RECIPE_OUTPUT=$(conda build conda/$recipe --python=$CONDA_PY --numpy=$CONDA_NPY --output)
|
|
if [[ -f "$RECIPE_OUTPUT" && "$DO_UPLOAD" = "true" ]]; then anaconda -t $ANACONDA_TOKEN upload "$RECIPE_OUTPUT" -u quantopian --label ci; fi
|
|
done
|
|
|
|
# unshallow the clone so the conda build can clone it.
|
|
- git fetch --unshallow
|
|
- exec 3>&1; ZP_OUT=$(conda build conda/zipline --python=$CONDA_PY --numpy=$CONDA_NPY -c quantopian -c https://conda.anaconda.org/quantopian/label/ci | tee >(cat - >&3))
|
|
- ZP_OUTPUT=$(echo "$ZP_OUT" | grep "anaconda upload" | awk '{print $NF}')
|
|
- if [[ "$DO_UPLOAD" = "true" ]]; then anaconda -t $ANACONDA_TOKEN upload $ZP_OUTPUT -u quantopian --label ci; fi
|
|
# reactivate env (necessary for coveralls)
|
|
- source activate testenv
|
|
|
|
after_success:
|
|
- coveralls
|
|
|
|
branches:
|
|
only:
|
|
- master
|
|
- exchange-calendars-v2
|