.gitlab-ci.yml 4.13 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
7
8
9
10
build-3.6-VS2017:
  stage:
    build
  tags:
    - VS2017
11
12
13
  variables:
    BUILD_PLATFORM: "VS2017"
    ARCHITECTURE: "x64"
14
15
16
  before_script:
    - git submodule sync --recursive
    - git submodule update --init --recursive
Isaak Lim's avatar
Isaak Lim committed
17
18
19
  script:
    - set Path=%Path%;C:\Program Files\Python36;C:\Program Files\Python36\Scripts;
    - virtualenv --clear -p "C:\Program Files\Python36\python.exe" .
20
    - call .\Scripts\activate
Isaak Lim's avatar
Isaak Lim committed
21
22
23
24
    - python setup.py bdist_wheel --dist-dir dist3
  artifacts:
    paths:
      - dist3/
25

Isaak Lim's avatar
Isaak Lim committed
26
build-3.5-linux:
Isaak Lim's avatar
Isaak Lim committed
27
28
  stage:
    build
Janis Born's avatar
Janis Born committed
29
30
  tags:
    - Linux
Isaak Lim's avatar
Isaak Lim committed
31
32
33
34
35
36
37
38
39
40
41
42
43
44
  variables:
    GIT_SUBMODULE_STRATEGY: recursive
  script:
    - virtualenv --clear -p python3.5 .
    - 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
45
    - Apple
46
47
  variables:
    GIT_SUBMODULE_STRATEGY: recursive
Isaak Lim's avatar
Isaak Lim committed
48
  script:
Isaak Lim's avatar
Isaak Lim committed
49
    - export PATH=/opt/local/bin:$PATH
Isaak Lim's avatar
Isaak Lim committed
50
51
    - virtualenv --clear -p python3.5 .
    - source bin/activate
Isaak Lim's avatar
Isaak Lim committed
52
53
54
55
    - python setup.py bdist_wheel --dist-dir dist3
  artifacts:
    paths:
      - dist3/
Isaak Lim's avatar
Isaak Lim committed
56

Isaak Lim's avatar
Isaak Lim committed
57
build-2.7-linux:
Isaak Lim's avatar
Isaak Lim committed
58
59
  stage:
    build
Janis Born's avatar
Janis Born committed
60
61
  tags:
    - Linux
Isaak Lim's avatar
Isaak Lim committed
62
63
64
65
66
67
68
69
70
71
72
73
74
75
  variables:
    GIT_SUBMODULE_STRATEGY: recursive
  script:
    - virtualenv --clear -p python2.7 .
    - 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
76
    - Apple
77
78
  variables:
    GIT_SUBMODULE_STRATEGY: recursive
Isaak Lim's avatar
Isaak Lim committed
79
  script:
Isaak Lim's avatar
Isaak Lim committed
80
    - export PATH=/opt/local/bin:$PATH
Isaak Lim's avatar
Isaak Lim committed
81
82
    - virtualenv --clear -p python2.7 .
    - source bin/activate
Isaak Lim's avatar
Isaak Lim committed
83
84
85
86
87
    - python setup.py bdist_wheel --dist-dir dist2
  artifacts:
    paths:
      - dist2/

Isaak Lim's avatar
Isaak Lim committed
88
89
90
91
92
93
test-3.6-VS2017:
  stage:
    test
  tags:
    - VS2017
  dependencies:
Isaak Lim's avatar
Isaak Lim committed
94
    - build-3.6-VS2017
Isaak Lim's avatar
Isaak Lim committed
95
96
97
  script:
    - set Path=%Path%;C:\Program Files\Python36;C:\Program Files\Python36\Scripts;
    - virtualenv --clear -p "C:\Program Files\Python36\python.exe" .
98
    - call .\Scripts\activate
Isaak Lim's avatar
Isaak Lim committed
99
    - cd dist3
Isaak Lim's avatar
Isaak Lim committed
100
    - FOR %%a IN (*.whl) DO pip install %%a
Isaak Lim's avatar
Isaak Lim committed
101
    - cd ..\tests
Isaak Lim's avatar
Isaak Lim committed
102
103
    - python -m unittest discover

Isaak Lim's avatar
Isaak Lim committed
104
test-3.5-linux:
Isaak Lim's avatar
Isaak Lim committed
105
106
107
108
  stage:
    test
  tags:
    - Linux
Isaak Lim's avatar
Isaak Lim committed
109
110
111
112
113
114
115
116
117
118
119
120
121
  dependencies:
    - build-3.5-linux
  script:
    - virtualenv --clear -p python3.5 .
    - 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
122
    - Apple
Isaak Lim's avatar
Isaak Lim committed
123
  dependencies:
Isaak Lim's avatar
Isaak Lim committed
124
    - build-3.5-macos
Isaak Lim's avatar
Isaak Lim committed
125
  script:
Isaak Lim's avatar
Isaak Lim committed
126
    - export PATH=/opt/local/bin:$PATH
Isaak Lim's avatar
Isaak Lim committed
127
128
129
    - virtualenv --clear -p python3.5 .
    - source bin/activate
    - pip install dist3/*.whl
Isaak Lim's avatar
Isaak Lim committed
130
131
132
    - cd tests
    - python -m unittest discover

Isaak Lim's avatar
Isaak Lim committed
133
test-2.7-linux:
Isaak Lim's avatar
Isaak Lim committed
134
135
136
137
  stage:
    test
  tags:
    - Linux
Isaak Lim's avatar
Isaak Lim committed
138
139
140
141
142
143
144
145
146
147
148
149
150
  dependencies:
    - build-2.7-linux
  script:
    - virtualenv --clear -p python2.7 .
    - 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
151
    - Apple
Isaak Lim's avatar
Isaak Lim committed
152
  dependencies:
Isaak Lim's avatar
Isaak Lim committed
153
    - build-2.7-macos
Isaak Lim's avatar
Isaak Lim committed
154
  script:
Isaak Lim's avatar
Isaak Lim committed
155
    - export PATH=/opt/local/bin:$PATH
Isaak Lim's avatar
Isaak Lim committed
156
157
158
    - virtualenv --clear -p python2.7 .
    - source bin/activate
    - pip install dist2/*.whl
Isaak Lim's avatar
Isaak Lim committed
159
160
    - cd tests
    - python -m unittest discover
161

Isaak Lim's avatar
Isaak Lim committed
162
163
164
165
166
167
deploy-3.6-VS2017:
  stage:
    deploy
  tags:
    - VS2017
  dependencies:
Isaak Lim's avatar
Isaak Lim committed
168
    - build-3.6-VS2017
Isaak Lim's avatar
Isaak Lim committed
169
170
  script:
    - mkdir release
Isaak Lim's avatar
Isaak Lim committed
171
    - cd dist3
Isaak Lim's avatar
Isaak Lim committed
172
    - FOR %%a IN (*.whl) DO cp %%a ..\release
Isaak Lim's avatar
Isaak Lim committed
173
174
175
  artifacts:
    paths:
      - release/*.whl
Isaak Lim's avatar
Isaak Lim committed
176

Isaak Lim's avatar
Isaak Lim committed
177
deploy-3.5-linux:
Isaak Lim's avatar
Isaak Lim committed
178
179
180
181
  stage:
    deploy
  tags:
    - Linux
Isaak Lim's avatar
Isaak Lim committed
182
183
184
185
186
187
188
189
190
191
192
193
194
  dependencies:
    - build-3.5-linux
  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
195
    - Apple
Isaak Lim's avatar
Isaak Lim committed
196
  dependencies:
Isaak Lim's avatar
Isaak Lim committed
197
    - build-3.5-macos
Isaak Lim's avatar
Isaak Lim committed
198
199
200
201
202
203
204
  script:
    - mkdir release
    - cp dist3/*.whl release
  artifacts:
    paths:
      - release/*.whl

Isaak Lim's avatar
Isaak Lim committed
205
deploy-2.7-linux:
Isaak Lim's avatar
Isaak Lim committed
206
207
208
209
  stage:
    deploy
  tags:
    - Linux
Isaak Lim's avatar
Isaak Lim committed
210
211
212
213
214
215
216
217
218
219
220
221
222
  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
223
    - Apple
Isaak Lim's avatar
Isaak Lim committed
224
  dependencies:
Isaak Lim's avatar
Isaak Lim committed
225
    - build-2.7-macos
Isaak Lim's avatar
Isaak Lim committed
226
227
228
229
230
231
  script:
    - mkdir release
    - cp dist2/*.whl release
  artifacts:
    paths:
      - release/*.whl