.gitlab-ci.yml 4.3 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 .
Jan Möbius's avatar
Jan Möbius committed
48
    - ls
Isaak Lim's avatar
Isaak Lim committed
49
    - source bin/activate
Isaak Lim's avatar
Isaak Lim committed
50 51 52 53
    - python setup.py bdist_wheel --dist-dir dist3
  artifacts:
    paths:
      - dist3/
Isaak Lim's avatar
Isaak Lim committed
54

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

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

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

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

Isaak Lim's avatar
Isaak Lim committed
155
deploy-3.7-VS2017:
Isaak Lim's avatar
Isaak Lim committed
156 157 158 159
  stage:
    deploy
  tags:
    - VS2017
160
    - python37
Isaak Lim's avatar
Isaak Lim committed
161
  dependencies:
Isaak Lim's avatar
Isaak Lim committed
162
    - build-3.7-VS2017
Isaak Lim's avatar
Isaak Lim committed
163 164
  script:
    - mkdir release
Isaak Lim's avatar
Isaak Lim committed
165
    - cd dist3
Isaak Lim's avatar
Isaak Lim committed
166
    - FOR %a IN (*.whl) DO copy %a ..\release
Isaak Lim's avatar
Isaak Lim committed
167 168 169
  artifacts:
    paths:
      - release/*.whl
Isaak Lim's avatar
Isaak Lim committed
170

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

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

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

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