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

Isaak Lim's avatar
Isaak Lim committed
27
build-3.7-linux:
Isaak Lim's avatar
Isaak Lim committed
28 29
  stage:
    build
Janis Born's avatar
Janis Born committed
30 31
  tags:
    - Linux
Isaak Lim's avatar
Isaak Lim committed
32 33 34
  variables:
    GIT_SUBMODULE_STRATEGY: recursive
  script:
Isaak Lim's avatar
Isaak Lim committed
35
    - virtualenv --clear -p python3.7 .
Isaak Lim's avatar
Isaak Lim committed
36 37 38 39 40 41 42 43 44 45
    - 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
46
    - Apple
47 48
  variables:
    GIT_SUBMODULE_STRATEGY: recursive
Isaak Lim's avatar
Isaak Lim committed
49
  script:
Isaak Lim's avatar
Isaak Lim committed
50
    - export PATH=/opt/local/bin:$PATH
Isaak Lim's avatar
Isaak Lim committed
51
    - virtualenv --clear -p python3.5 .
Jan Möbius's avatar
Jan Möbius committed
52
    - pwd
Isaak Lim's avatar
fix CI  
Isaak Lim committed
53 54
    - ls
    - ls /opt/local/bin
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 69 70 71 72 73 74 75 76 77 78 79
  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
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
Isaak Lim's avatar
Isaak Lim committed
85
    - virtualenv --clear -p python2.7 .
Jan Möbius's avatar
Jan Möbius committed
86
    - pwd
Isaak Lim's avatar
fix CI  
Isaak Lim committed
87 88
    - ls
    - ls /opt/local/bin
Isaak Lim's avatar
Isaak Lim committed
89
    - source bin/activate
Isaak Lim's avatar
Isaak Lim committed
90 91 92 93 94
    - python setup.py bdist_wheel --dist-dir dist2
  artifacts:
    paths:
      - dist2/

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

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

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

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

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

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

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

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