.gitlab-ci.yml 4.25 KB
Newer Older
Isaak Lim's avatar
Isaak Lim committed
1
2
3
4
stages:
  - build
  - test
  - deploy
5

Isaak Lim's avatar
Isaak Lim committed
6
build-3.7-VS2017:
Isaak Lim's avatar
Isaak Lim committed
7
8
9
10
  stage:
    build
  tags:
    - VS2017
11
    - python37
12
13
14
  variables:
    BUILD_PLATFORM: "VS2017"
    ARCHITECTURE: "x64"
15
16
17
  before_script:
    - git submodule sync --recursive
    - git submodule update --init --recursive
18
  script: "CI\\build-3.7-VS2017.bat"
Isaak Lim's avatar
Isaak Lim committed
19
20
21
  artifacts:
    paths:
      - dist3/
22

Isaak Lim's avatar
Isaak Lim committed
23
build-3.7-linux:
Isaak Lim's avatar
Isaak Lim committed
24
25
  stage:
    build
Janis Born's avatar
Janis Born committed
26
27
  tags:
    - Linux
Isaak Lim's avatar
Isaak Lim committed
28
29
30
  variables:
    GIT_SUBMODULE_STRATEGY: recursive
  script:
Isaak Lim's avatar
Isaak Lim committed
31
    - virtualenv -p python3.7 .
Isaak Lim's avatar
Isaak Lim committed
32
33
34
35
36
37
38
39
40
41
    - source bin/activate
    - python setup.py bdist_wheel --dist-dir dist3
  artifacts:
    paths:
      - dist3/

build-3.5-macos:
  stage:
    build
  tags:
Isaak Lim's avatar
Isaak Lim committed
42
    - Apple
43
44
  variables:
    GIT_SUBMODULE_STRATEGY: recursive
Isaak Lim's avatar
Isaak Lim committed
45
  script:
Isaak Lim's avatar
Isaak Lim committed
46
    - export PATH=/opt/local/bin:$PATH
Jan Möbius's avatar
Jan Möbius committed
47
    - virtualenv -p python3.5 .
Jan Möbius's avatar
Jan Möbius committed
48
    - ls
Isaak Lim's avatar
Isaak Lim committed
49
    - source bin/activate
Isaak Lim's avatar
Isaak Lim committed
50
51
52
53
    - python setup.py bdist_wheel --dist-dir dist3
  artifacts:
    paths:
      - dist3/
Isaak Lim's avatar
Isaak Lim committed
54

Isaak Lim's avatar
Isaak Lim committed
55
build-2.7-linux:
Isaak Lim's avatar
Isaak Lim committed
56
57
  stage:
    build
Janis Born's avatar
Janis Born committed
58
59
  tags:
    - Linux
Isaak Lim's avatar
Isaak Lim committed
60
61
62
  variables:
    GIT_SUBMODULE_STRATEGY: recursive
  script:
Isaak Lim's avatar
Isaak Lim committed
63
    - virtualenv -p python2.7 .
Isaak Lim's avatar
Isaak Lim committed
64
65
66
67
68
69
70
71
72
73
    - source bin/activate
    - python setup.py bdist_wheel --dist-dir dist2
  artifacts:
    paths:
      - dist2/

build-2.7-macos:
  stage:
    build
  tags:
Isaak Lim's avatar
Isaak Lim committed
74
    - Apple
75
76
  variables:
    GIT_SUBMODULE_STRATEGY: recursive
Isaak Lim's avatar
Isaak Lim committed
77
  script:
Isaak Lim's avatar
Isaak Lim committed
78
    - export PATH=/opt/local/bin:$PATH
Jan Möbius's avatar
Jan Möbius committed
79
    - virtualenv -p python2.7 .
Jan Möbius's avatar
Jan Möbius committed
80
    - ls
Isaak Lim's avatar
Isaak Lim committed
81
    - source bin/activate
Isaak Lim's avatar
Isaak Lim committed
82
83
84
85
86
    - python setup.py bdist_wheel --dist-dir dist2
  artifacts:
    paths:
      - dist2/

Isaak Lim's avatar
Isaak Lim committed
87
test-3.7-VS2017:
Isaak Lim's avatar
Isaak Lim committed
88
89
90
91
  stage:
    test
  tags:
    - VS2017
92
    - python37
Isaak Lim's avatar
Isaak Lim committed
93
  dependencies:
Isaak Lim's avatar
Isaak Lim committed
94
    - build-3.7-VS2017
95
  script: "CI\\test-3.7-VS2017.bat"
Isaak Lim's avatar
Isaak Lim committed
96

Isaak Lim's avatar
Isaak Lim committed
97
test-3.7-linux:
Isaak Lim's avatar
Isaak Lim committed
98
99
100
101
  stage:
    test
  tags:
    - Linux
Isaak Lim's avatar
Isaak Lim committed
102
  dependencies:
Isaak Lim's avatar
Isaak Lim committed
103
    - build-3.7-linux
Isaak Lim's avatar
Isaak Lim committed
104
  script:
Isaak Lim's avatar
Isaak Lim committed
105
    - virtualenv -p python3.7 .
Isaak Lim's avatar
Isaak Lim committed
106
107
108
109
110
111
112
113
114
    - source bin/activate
    - pip install dist3/*.whl
    - cd tests
    - python -m unittest discover

test-3.5-macos:
  stage:
    test
  tags:
Isaak Lim's avatar
Isaak Lim committed
115
    - Apple
Isaak Lim's avatar
Isaak Lim committed
116
  dependencies:
Isaak Lim's avatar
Isaak Lim committed
117
    - build-3.5-macos
Isaak Lim's avatar
Isaak Lim committed
118
  script:
Isaak Lim's avatar
Isaak Lim committed
119
    - export PATH=/opt/local/bin:$PATH
Jan Möbius's avatar
Jan Möbius committed
120
    - virtualenv -p python3.5 .
Isaak Lim's avatar
Isaak Lim committed
121
122
    - source bin/activate
    - pip install dist3/*.whl
Isaak Lim's avatar
Isaak Lim committed
123
124
125
    - cd tests
    - python -m unittest discover

Isaak Lim's avatar
Isaak Lim committed
126
test-2.7-linux:
Isaak Lim's avatar
Isaak Lim committed
127
128
129
130
  stage:
    test
  tags:
    - Linux
Isaak Lim's avatar
Isaak Lim committed
131
132
133
  dependencies:
    - build-2.7-linux
  script:
Isaak Lim's avatar
Isaak Lim committed
134
    - virtualenv -p python2.7 .
Isaak Lim's avatar
Isaak Lim committed
135
136
137
138
139
140
141
142
143
    - source bin/activate
    - pip install dist2/*.whl
    - cd tests
    - python -m unittest discover

test-2.7-macos:
  stage:
    test
  tags:
Isaak Lim's avatar
Isaak Lim committed
144
    - Apple
Isaak Lim's avatar
Isaak Lim committed
145
  dependencies:
Isaak Lim's avatar
Isaak Lim committed
146
    - build-2.7-macos
Isaak Lim's avatar
Isaak Lim committed
147
  script:
Isaak Lim's avatar
Isaak Lim committed
148
    - export PATH=/opt/local/bin:$PATH
Jan Möbius's avatar
Jan Möbius committed
149
    - virtualenv -p python2.7 .
Isaak Lim's avatar
Isaak Lim committed
150
151
    - source bin/activate
    - pip install dist2/*.whl
Isaak Lim's avatar
Isaak Lim committed
152
153
    - cd tests
    - python -m unittest discover
154

Isaak Lim's avatar
Isaak Lim committed
155
deploy-3.7-VS2017:
Isaak Lim's avatar
Isaak Lim committed
156
157
158
159
  stage:
    deploy
  tags:
    - VS2017
160
    - python37
Isaak Lim's avatar
Isaak Lim committed
161
  dependencies:
Isaak Lim's avatar
Isaak Lim committed
162
    - build-3.7-VS2017
163
  script: "CI\\deploy-3.7-VS2017.bat"
Isaak Lim's avatar
Isaak Lim committed
164
165
166
  artifacts:
    paths:
      - release/*.whl
Isaak Lim's avatar
Isaak Lim committed
167

Isaak Lim's avatar
Isaak Lim committed
168
deploy-3.7-linux:
Isaak Lim's avatar
Isaak Lim committed
169
170
171
172
  stage:
    deploy
  tags:
    - Linux
Isaak Lim's avatar
Isaak Lim committed
173
  dependencies:
Isaak Lim's avatar
Isaak Lim committed
174
    - build-3.7-linux
Isaak Lim's avatar
Isaak Lim committed
175
176
177
178
179
180
181
182
183
184
185
  script:
    - mkdir release
    - cp dist3/*.whl release
  artifacts:
    paths:
      - release/*.whl

deploy-3.5-macos:
  stage:
    deploy
  tags:
Isaak Lim's avatar
Isaak Lim committed
186
    - Apple
Isaak Lim's avatar
Isaak Lim committed
187
  dependencies:
Isaak Lim's avatar
Isaak Lim committed
188
    - build-3.5-macos
Isaak Lim's avatar
Isaak Lim committed
189
190
191
192
193
194
195
  script:
    - mkdir release
    - cp dist3/*.whl release
  artifacts:
    paths:
      - release/*.whl

Isaak Lim's avatar
Isaak Lim committed
196
deploy-2.7-linux:
Isaak Lim's avatar
Isaak Lim committed
197
198
199
200
  stage:
    deploy
  tags:
    - Linux
Isaak Lim's avatar
Isaak Lim committed
201
202
203
204
205
206
207
208
209
210
211
212
213
  dependencies:
    - build-2.7-linux
  script:
    - mkdir release
    - cp dist2/*.whl release
  artifacts:
    paths:
      - release/*.whl

deploy-2.7-macos:
  stage:
    deploy
  tags:
Isaak Lim's avatar
Isaak Lim committed
214
    - Apple
Isaak Lim's avatar
Isaak Lim committed
215
  dependencies:
Isaak Lim's avatar
Isaak Lim committed
216
    - build-2.7-macos
Isaak Lim's avatar
Isaak Lim committed
217
218
219
220
221
222
  script:
    - mkdir release
    - cp dist2/*.whl release
  artifacts:
    paths:
      - release/*.whl
Isaak Lim's avatar
Isaak Lim committed
223

Isaak Lim's avatar
Isaak Lim committed
224
225
226
227
228
229
230
231
deploy-sdist:
  stage:
    deploy
  tags:
    - Linux
  variables:
    GIT_SUBMODULE_STRATEGY: recursive
  script:
Isaak Lim's avatar
Isaak Lim committed
232
    - virtualenv -p python3.7 .
Isaak Lim's avatar
Isaak Lim committed
233
234
235
236
237
238
    - source bin/activate
    - python setup.py sdist --dist-dir release
  artifacts:
    paths:
      - release/

Isaak Lim's avatar
Isaak Lim committed
239
240
241
242
243
244
deploy-documentation:
  stage:
    deploy
  tags:
    - Linux
  dependencies:
Isaak Lim's avatar
Isaak Lim committed
245
    - build-3.7-linux
Isaak Lim's avatar
Isaak Lim committed
246
  script:
Isaak Lim's avatar
Isaak Lim committed
247
    - virtualenv -p python3.7 .
Isaak Lim's avatar
Isaak Lim committed
248
249
    - source bin/activate
    - pip install dist3/*.whl
250
    - pip install sphinx sphinx_rtd_theme
Isaak Lim's avatar
Isaak Lim committed
251
252
253
254
255
256
257
    - mkdir documentation
    - cd docs
    - make html
    - cp -r _build/html/* ../documentation
  artifacts:
    paths:
      - documentation/