.gitlab-ci.yml 4.24 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
18
  script: "CI\\build-3.7-VS2017.bat"
Isaak Lim's avatar
Isaak Lim committed
19 20 21
  artifacts:
    paths:
      - dist3/
22

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

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

Isaak Lim's avatar
Isaak Lim committed
85
test-3.7-VS2017:
Isaak Lim's avatar
Isaak Lim committed
86 87 88 89
  stage:
    test
  tags:
    - VS2017
90
    - python37
Isaak Lim's avatar
Isaak Lim committed
91
  dependencies:
Isaak Lim's avatar
Isaak Lim committed
92
    - build-3.7-VS2017
93
  script: "CI\\test-3.7-VS2017.bat"
Isaak Lim's avatar
Isaak Lim committed
94

Isaak Lim's avatar
Isaak Lim committed
95
test-3.7-linux:
Isaak Lim's avatar
Isaak Lim committed
96 97 98 99
  stage:
    test
  tags:
    - Linux
Isaak Lim's avatar
Isaak Lim committed
100
  dependencies:
Isaak Lim's avatar
Isaak Lim committed
101
    - build-3.7-linux
Isaak Lim's avatar
Isaak Lim committed
102
  script:
Isaak Lim's avatar
Isaak Lim committed
103
    - virtualenv -p python3.7 .
Isaak Lim's avatar
Isaak Lim committed
104 105 106 107 108 109 110 111 112
    - 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
113
    - Apple
Isaak Lim's avatar
Isaak Lim committed
114
  dependencies:
Isaak Lim's avatar
Isaak Lim committed
115
    - build-3.5-macos
Isaak Lim's avatar
Isaak Lim committed
116
  script:
Isaak Lim's avatar
Isaak Lim committed
117
    - export PATH=/opt/local/bin:$PATH
Jan Möbius's avatar
Jan Möbius committed
118
    - virtualenv -p python3.5 .
Isaak Lim's avatar
Isaak Lim committed
119 120
    - source bin/activate
    - pip install dist3/*.whl
Isaak Lim's avatar
Isaak Lim committed
121 122 123
    - cd tests
    - python -m unittest discover

Isaak Lim's avatar
Isaak Lim committed
124
test-2.7-linux:
Isaak Lim's avatar
Isaak Lim committed
125 126 127 128
  stage:
    test
  tags:
    - Linux
Isaak Lim's avatar
Isaak Lim committed
129 130 131
  dependencies:
    - build-2.7-linux
  script:
Isaak Lim's avatar
Isaak Lim committed
132
    - virtualenv -p python2.7 .
Isaak Lim's avatar
Isaak Lim committed
133 134 135 136 137 138 139 140 141
    - 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
142
    - Apple
Isaak Lim's avatar
Isaak Lim committed
143
  dependencies:
Isaak Lim's avatar
Isaak Lim committed
144
    - build-2.7-macos
Isaak Lim's avatar
Isaak Lim committed
145
  script:
Isaak Lim's avatar
Isaak Lim committed
146
    - export PATH=/opt/local/bin:$PATH
Jan Möbius's avatar
Jan Möbius committed
147
    - virtualenv -p python2.7 .
Isaak Lim's avatar
Isaak Lim committed
148 149
    - source bin/activate
    - pip install dist2/*.whl
Isaak Lim's avatar
Isaak Lim committed
150 151
    - cd tests
    - python -m unittest discover
152

Isaak Lim's avatar
Isaak Lim committed
153
deploy-3.7-VS2017:
Isaak Lim's avatar
Isaak Lim committed
154 155 156 157
  stage:
    deploy
  tags:
    - VS2017
158
    - python37
Isaak Lim's avatar
Isaak Lim committed
159
  dependencies:
Isaak Lim's avatar
Isaak Lim committed
160
    - build-3.7-VS2017
161
  script: "CI\\deploy-3.7-VS2017.bat"
Isaak Lim's avatar
Isaak Lim committed
162 163 164
  artifacts:
    paths:
      - release/*.whl
Isaak Lim's avatar
Isaak Lim committed
165

Isaak Lim's avatar
Isaak Lim committed
166
deploy-3.7-linux:
Isaak Lim's avatar
Isaak Lim committed
167 168 169 170
  stage:
    deploy
  tags:
    - Linux
Isaak Lim's avatar
Isaak Lim committed
171
  dependencies:
Isaak Lim's avatar
Isaak Lim committed
172
    - build-3.7-linux
Isaak Lim's avatar
Isaak Lim committed
173 174 175 176 177 178 179 180 181 182 183
  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
184
    - Apple
Isaak Lim's avatar
Isaak Lim committed
185
  dependencies:
Isaak Lim's avatar
Isaak Lim committed
186
    - build-3.5-macos
Isaak Lim's avatar
Isaak Lim committed
187 188 189 190 191 192 193
  script:
    - mkdir release
    - cp dist3/*.whl release
  artifacts:
    paths:
      - release/*.whl

Isaak Lim's avatar
Isaak Lim committed
194
deploy-2.7-linux:
Isaak Lim's avatar
Isaak Lim committed
195 196 197 198
  stage:
    deploy
  tags:
    - Linux
Isaak Lim's avatar
Isaak Lim committed
199 200 201 202 203 204 205 206 207 208 209 210 211
  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
212
    - Apple
Isaak Lim's avatar
Isaak Lim committed
213
  dependencies:
Isaak Lim's avatar
Isaak Lim committed
214
    - build-2.7-macos
Isaak Lim's avatar
Isaak Lim committed
215 216 217 218 219 220
  script:
    - mkdir release
    - cp dist2/*.whl release
  artifacts:
    paths:
      - release/*.whl
Isaak Lim's avatar
Isaak Lim committed
221

Isaak Lim's avatar
Isaak Lim committed
222 223 224 225 226 227 228 229
deploy-sdist:
  stage:
    deploy
  tags:
    - Linux
  variables:
    GIT_SUBMODULE_STRATEGY: recursive
  script:
Isaak Lim's avatar
Isaak Lim committed
230
    - virtualenv -p python3.7 .
Isaak Lim's avatar
Isaak Lim committed
231 232 233 234 235 236
    - source bin/activate
    - python setup.py sdist --dist-dir release
  artifacts:
    paths:
      - release/

Isaak Lim's avatar
Isaak Lim committed
237 238 239 240 241 242
deploy-documentation:
  stage:
    deploy
  tags:
    - Linux
  dependencies:
Isaak Lim's avatar
Isaak Lim committed
243
    - build-3.7-linux
Isaak Lim's avatar
Isaak Lim committed
244
  script:
Isaak Lim's avatar
Isaak Lim committed
245
    - virtualenv -p python3.7 .
Isaak Lim's avatar
Isaak Lim committed
246 247
    - source bin/activate
    - pip install dist3/*.whl
248
    - pip install sphinx sphinx_rtd_theme
Isaak Lim's avatar
Isaak Lim committed
249 250 251 252 253 254 255
    - mkdir documentation
    - cd docs
    - make html
    - cp -r _build/html/* ../documentation
  artifacts:
    paths:
      - documentation/