.gitlab-ci.yml 4.82 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
Isaak Lim's avatar
Isaak Lim committed
18
  script:
Isaak Lim's avatar
Isaak Lim committed
19 20 21
    - echo "%PATH%"
    - set PATH="C:\Program Files\Python37;C:\Program Files\Python37\Scripts;C:\Program Files\CMake\bin;%PATH%"
    - echo "%PATH%"
Jan Möbius's avatar
Jan Möbius committed
22
    - virtualenv -p "C:\Program Files\Python37\python.exe" .
23
    - call .\Scripts\activate
Isaak Lim's avatar
Isaak Lim committed
24 25 26 27
    - python setup.py bdist_wheel --dist-dir dist3
  artifacts:
    paths:
      - dist3/
28

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

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

Isaak Lim's avatar
Isaak Lim committed
93
test-3.7-VS2017:
Isaak Lim's avatar
Isaak Lim committed
94 95 96 97
  stage:
    test
  tags:
    - VS2017
98
    - python37
Isaak Lim's avatar
Isaak Lim committed
99
  dependencies:
Isaak Lim's avatar
Isaak Lim committed
100
    - build-3.7-VS2017
Isaak Lim's avatar
Isaak Lim committed
101
  script:
Isaak Lim's avatar
Isaak Lim committed
102
    - set PATH="C:\Program Files\Python37;C:\Program Files\Python37\Scripts;%PATH%"
Jan Möbius's avatar
Jan Möbius committed
103
    - virtualenv -p "C:\Program Files\Python37\python.exe" .
104
    - call .\Scripts\activate
Isaak Lim's avatar
Isaak Lim committed
105
    - cd dist3
Isaak Lim's avatar
Isaak Lim committed
106
    - FOR %%a IN (*.whl) DO pip install %%a
Isaak Lim's avatar
Isaak Lim committed
107
    - cd ..\tests
Isaak Lim's avatar
Isaak Lim committed
108 109
    - python -m unittest discover

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

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

Isaak Lim's avatar
Isaak Lim committed
168
deploy-3.7-VS2017:
Isaak Lim's avatar
Isaak Lim committed
169 170 171 172
  stage:
    deploy
  tags:
    - VS2017
173
    - python37
Isaak Lim's avatar
Isaak Lim committed
174
  dependencies:
Isaak Lim's avatar
Isaak Lim committed
175
    - build-3.7-VS2017
Isaak Lim's avatar
Isaak Lim committed
176 177
  script:
    - mkdir release
Isaak Lim's avatar
Isaak Lim committed
178
    - cd dist3
179
    - FOR %%a IN (*.whl) DO copy %%a ..\release
Isaak Lim's avatar
Isaak Lim committed
180 181 182
  artifacts:
    paths:
      - release/*.whl
Isaak Lim's avatar
Isaak Lim committed
183

Isaak Lim's avatar
Isaak Lim committed
184
deploy-3.7-linux:
Isaak Lim's avatar
Isaak Lim committed
185 186 187 188
  stage:
    deploy
  tags:
    - Linux
Isaak Lim's avatar
Isaak Lim committed
189
  dependencies:
Isaak Lim's avatar
Isaak Lim committed
190
    - build-3.7-linux
Isaak Lim's avatar
Isaak Lim committed
191 192 193 194 195 196 197 198 199 200 201
  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
202
    - Apple
Isaak Lim's avatar
Isaak Lim committed
203
  dependencies:
Isaak Lim's avatar
Isaak Lim committed
204
    - build-3.5-macos
Isaak Lim's avatar
Isaak Lim committed
205 206 207 208 209 210 211
  script:
    - mkdir release
    - cp dist3/*.whl release
  artifacts:
    paths:
      - release/*.whl

Isaak Lim's avatar
Isaak Lim committed
212
deploy-2.7-linux:
Isaak Lim's avatar
Isaak Lim committed
213 214 215 216
  stage:
    deploy
  tags:
    - Linux
Isaak Lim's avatar
Isaak Lim committed
217 218 219 220 221 222 223 224 225 226 227 228 229
  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
230
    - Apple
Isaak Lim's avatar
Isaak Lim committed
231
  dependencies:
Isaak Lim's avatar
Isaak Lim committed
232
    - build-2.7-macos
Isaak Lim's avatar
Isaak Lim committed
233 234 235 236 237 238
  script:
    - mkdir release
    - cp dist2/*.whl release
  artifacts:
    paths:
      - release/*.whl
Isaak Lim's avatar
Isaak Lim committed
239

Isaak Lim's avatar
Isaak Lim committed
240 241 242 243 244 245 246 247
deploy-sdist:
  stage:
    deploy
  tags:
    - Linux
  variables:
    GIT_SUBMODULE_STRATEGY: recursive
  script:
Isaak Lim's avatar
Isaak Lim committed
248
    - virtualenv -p python3.7 .
Isaak Lim's avatar
Isaak Lim committed
249 250 251 252 253 254
    - source bin/activate
    - python setup.py sdist --dist-dir release
  artifacts:
    paths:
      - release/

Isaak Lim's avatar
Isaak Lim committed
255 256 257 258 259 260
deploy-documentation:
  stage:
    deploy
  tags:
    - Linux
  dependencies:
Isaak Lim's avatar
Isaak Lim committed
261
    - build-3.7-linux
Isaak Lim's avatar
Isaak Lim committed
262
  script:
Isaak Lim's avatar
Isaak Lim committed
263
    - virtualenv -p python3.7 .
Isaak Lim's avatar
Isaak Lim committed
264 265
    - source bin/activate
    - pip install dist3/*.whl
266
    - pip install sphinx sphinx_rtd_theme
Isaak Lim's avatar
Isaak Lim committed
267 268 269 270 271 272 273
    - mkdir documentation
    - cd docs
    - make html
    - cp -r _build/html/* ../documentation
  artifacts:
    paths:
      - documentation/