.gitlab-ci.yml 4.86 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
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 52
    - virtualenv --clear -p python3.5 .
    - source bin/activate
Isaak Lim's avatar
Isaak Lim committed
53 54 55 56
    - python setup.py bdist_wheel --dist-dir dist3
  artifacts:
    paths:
      - dist3/
Isaak Lim's avatar
Isaak Lim committed
57

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

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

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

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

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

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

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

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

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