102 lines
3.0 KiB
YAML
102 lines
3.0 KiB
YAML
language: python
|
|
|
|
dist: xenial # required for Python >= 3.7 (travis-ci/travis-ci#9069)
|
|
|
|
cache: pip
|
|
|
|
git:
|
|
depth: 1
|
|
|
|
env:
|
|
- >
|
|
VNPY_BUILD_PARALLEL=1
|
|
VNPY_BUILD_CTP=1
|
|
VNPY_BUILD_OES=1
|
|
|
|
python:
|
|
- "3.7"
|
|
|
|
services:
|
|
- mongodb
|
|
- mysql
|
|
- postgresql
|
|
|
|
before_script:
|
|
- psql -d postgresql://postgres:${VNPY_TEST_POSTGRESQL_PASSWORD}@localhost -c "create database vnpy;"
|
|
- mysql -u root --password=${VNPY_TEST_MYSQL_PASSWORD} -e 'CREATE DATABASE vnpy;'
|
|
- source ci/env.sh;
|
|
|
|
script:
|
|
- cd tests;
|
|
- python test_all.py
|
|
|
|
matrix:
|
|
include:
|
|
- name: "code quality analysis: flake8"
|
|
before_install:
|
|
- python -m pip install flake8
|
|
install:
|
|
- "" # prevent running "pip install -r requirements.txt"
|
|
script:
|
|
- flake8
|
|
|
|
- name: "pip install under Ubuntu: gcc-8"
|
|
addons:
|
|
apt:
|
|
sources:
|
|
- ubuntu-toolchain-r-test
|
|
packages:
|
|
- g++-8
|
|
before_install:
|
|
- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 90
|
|
- sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++-8 90
|
|
- sudo update-alternatives --install /usr/bin/gcc cc /usr/bin/gcc-8 90
|
|
install:
|
|
# update pip & setuptools
|
|
- python -m pip install --upgrade pip wheel setuptools
|
|
# Linux install script
|
|
- python -m pip install https://pip.vnpy.com/colletion/ibapi-9.75.1-001-py3-none-any.whl
|
|
- bash ./install.sh
|
|
|
|
- name: "sdist install under Ubuntu: gcc-7"
|
|
addons:
|
|
apt:
|
|
sources:
|
|
- ubuntu-toolchain-r-test
|
|
packages:
|
|
- g++-7
|
|
before_install:
|
|
- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7 90
|
|
- sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++-7 90
|
|
- sudo update-alternatives --install /usr/bin/gcc cc /usr/bin/gcc-7 90
|
|
install:
|
|
# Linux install script
|
|
- python -m pip install --upgrade pip wheel setuptools
|
|
- pushd /tmp
|
|
- wget http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz
|
|
- tar -xf ta-lib-0.4.0-src.tar.gz
|
|
- cd ta-lib
|
|
- ./configure --prefix=/usr
|
|
- make # -j under gcc-7 failed!!?
|
|
- sudo make install
|
|
- popd
|
|
- python -m pip install numpy
|
|
- python -m pip install --pre --extra-index-url https://rquser:ricequant99@py.ricequant.com/simple/ rqdatac
|
|
- python -m pip install https://pip.vnpy.com/colletion/ibapi-9.75.1-001-py3-none-any.whl
|
|
- python setup.py sdist
|
|
- python -m pip install dist/`ls dist`
|
|
|
|
- name: "pip install under osx"
|
|
os: osx
|
|
language: shell # osx supports only shell
|
|
services: []
|
|
before_install: []
|
|
install:
|
|
- python3 -m pip install https://pip.vnpy.com/colletion/ibapi-9.75.1-001-py3-none-any.whl
|
|
- bash ./install_osx.sh
|
|
before_script: []
|
|
script:
|
|
- source ci/env.sh;
|
|
- cd tests;
|
|
- VNPY_TEST_ONLY_SQLITE=1 python3 test_all.py
|