.gitlab-ci.yml 4.85 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
    - set Path=%Path%;C:\Program Files\Python37;C:\Program Files\Python37\Scripts;C:\Program Files\CMake\bin;
Isaak Lim's avatar
Isaak Lim 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
Jan Möbius's avatar
Jan Möbius committed
51
    - virtualenv -p python3.5 .
Jan Möbius's avatar
Jan Möbius committed
52
    - ls
Isaak Lim's avatar
Isaak Lim committed
53
    - source bin/activate
Isaak Lim's avatar
Isaak Lim committed
54 55 56 57
    - python setup.py bdist_wheel --dist-dir dist3
  artifacts:
    paths:
      - dist3/
Isaak Lim's avatar
Isaak Lim committed
58

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

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

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

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

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

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

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

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

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