-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.yml
132 lines (126 loc) · 3.46 KB
/
config.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
version: 2
jobs:
flake8:
docker:
- image: circleci/python:3.7
steps:
- checkout
- restore_cache:
keys:
- flake8-dependencies
- run:
name: "create venv for caching"
command: |
python3 -m venv venv
- run:
name: "install flake8"
command: |
. venv/bin/activate
pip install flake8
- save_cache:
paths:
- ./venv
key: flake8-dependencies
- run:
name: "run flake8"
command: |
. venv/bin/activate
flake8
build_ctp_gcc8:
<<: &build_spec
docker:
- image: registry.cn-shanghai.aliyuncs.com/vnpy-ci/gcc-8-python-3.7:1.0
- image: circleci/postgres:latest
environment:
POSTGRES_DB: &db_name "vnpy"
POSTGRES_USER: "postgres"
POSTGRES_PASSWORD: &db_password "1234"
- image: circleci/mysql:latest
environment:
MYSQL_DATABASE: *db_name
MYSQL_ROOT_PASSWORD: *db_password
- image: circleci/mongo:latest
environment:
<<: &build_environment
VNPY_TEST_POSTGRESQL_PASSWORD: *db_password
VNPY_TEST_MYSQL_PASSWORD: *db_password
VNPY_BUILD_CTP: "1"
VNPY_BUILD_OES: "0"
# best suit for circle-ci
VNPY_BUILD_PARALLEL: "2"
steps:
- checkout
- run:
name: "create venv for caching"
command: |
python3 -m venv venv
- restore_cache:
keys:
- v2-dependencies-{{ checksum "requirements.txt" }}
# fallback to using the latest cache if no exact match is found
- v2-dependencies-
- run:
name: "showing environments"
command: |
. venv/bin/activate
source ci/env.sh
echo $PWD
python -V
pip list
gcc --version
free
cat /proc/cpuinfo|grep -P "(processor|cpu MHz|model name)"
set
- run:
name: "install some special pip packages"
command: |
. venv/bin/activate
source ci/env.sh
python -m pip --version
python -m pip install --upgrade pip wheel setuptools
python -m pip install https://pip.vnpy.com/colletion/ibapi-9.75.1-001-py3-none-any.whl
bash ci/gitlab_pre_install.sh
- run:
name: "install vnpy and its dependents"
command: |
. venv/bin/activate
source ci/env.sh
bash ./install.sh
- save_cache:
paths:
- ./venv
key: v2-dependencies-{{ checksum "requirements.txt" }}
- run:
name: "test"
command: |
. venv/bin/activate
source ci/env.sh
set
cd tests
python test_all.py
build_oes_gcc8:
<<: *build_spec
environment:
<<: *build_environment
VNPY_BUILD_CTP: "0"
VNPY_BUILD_OES: "1"
python_only:
<<: *build_spec
environment:
<<: *build_environment
VNPY_BUILD_CTP: "0"
VNPY_BUILD_OES: "0"
workflows:
version: 2
build_ctp_gcc8:
jobs:
- build_ctp_gcc8
build_oes_gcc8:
jobs:
- build_oes_gcc8
flake8:
jobs:
- flake8
python_only:
jobs:
- python_only