.gitlab-ci.yml 4.8 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 12 13
  variables:
    BUILD_PLATFORM: "VS2017"
    ARCHITECTURE: "x64"
14 15 16
  before_script:
    - git submodule sync --recursive
    - git submodule update --init --recursive
Isaak Lim's avatar
Isaak Lim committed
17
  script:
Isaak Lim's avatar
Isaak Lim committed
18
    - set Path=%Path%;C:\Program Files\Python37;C:\Program Files\Python37\Scripts;
Isaak Lim's avatar
Isaak Lim committed
19
    - echo %Path%
Isaak Lim's avatar
Isaak Lim committed
20
    - virtualenv --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.5-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 35 36 37 38 39 40 41 42 43 44 45
  variables:
    GIT_SUBMODULE_STRATEGY: recursive
  script:
    - virtualenv --clear -p python3.5 .
    - 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 94
  stage:
    test
  tags:
    - VS2017
  dependencies:
Isaak Lim's avatar
Isaak Lim committed
95
    - build-3.7-VS2017
Isaak Lim's avatar
Isaak Lim committed
96
  script:
Isaak Lim's avatar
Isaak Lim committed
97 98
    - set Path=%Path%;C:\Program Files\Python37;C:\Program Files\Python37\Scripts;
    - virtualenv --clear -p "C:\Program Files\Python37\python.exe" .
99
    - call .\Scripts\activate
Isaak Lim's avatar
Isaak Lim committed
100
    - cd dist3
Isaak Lim's avatar
Isaak Lim committed
101
    - FOR %%a IN (*.whl) DO pip install %%a
Isaak Lim's avatar
Isaak Lim committed
102
    - cd ..\tests
Isaak Lim's avatar
Isaak Lim committed
103 104
    - python -m unittest discover

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

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

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

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

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

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

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