ci.yml 26.5 KB
Newer Older
1
# THIS FILE IS AUTOGENERATED -- DO NOT EDIT #
René Fritze's avatar
René Fritze committed
2
#   Edit and Re-run .ci/gitlab/template.ci.py instead       #
3 4

stages:
5
  - sanity
6
  - test
René Fritze's avatar
René Fritze committed
7 8
  - build
  - install_checks
9 10
  - deploy

11 12
#************ definition of base jobs *********************************************************************************#

13
.test_base:
14 15 16 17 18 19
    retry:
        max: 2
        when:
            - runner_system_failure
            - stuck_or_timeout_failure
            - api_failure
20
    rules:
René Fritze's avatar
René Fritze committed
21
        - if: $CI_COMMIT_REF_NAME =~ /^staging.*/
22 23
          when: never
        - when: on_success
24
    variables:
René Fritze's avatar
René Fritze committed
25 26
        PYPI_MIRROR_TAG: 6482589aa9345c76ae77437661ecb4d67a1963d4
        CI_IMAGE_TAG: 6482589aa9345c76ae77437661ecb4d67a1963d4
René Fritze's avatar
René Fritze committed
27
        PYMOR_HYPOTHESIS_PROFILE: ci
28 29 30

.pytest:
    extends: .test_base
René Fritze's avatar
René Fritze committed
31 32
    tags:
      - long execution time
33 34
    environment:
        name: unsafe
René Fritze's avatar
René Fritze committed
35
    stage: test
36 37
    after_script:
      - .ci/gitlab/after_script.bash
38 39 40 41
    cache:
        key: same_db_on_all_runners
        paths:
          - .hypothesis
42 43 44 45 46
    artifacts:
        name: "$CI_JOB_STAGE-$CI_COMMIT_REF_SLUG"
        expire_in: 3 months
        paths:
            - src/pymortests/testdata/check_results/*/*_changed
47
            - coverage.xml
48
            - memory_usage.txt
49
            - .hypothesis
50
        reports:
51
            junit: test_results*.xml
52

53 54 55 56 57 58 59 60 61

.submit:
    extends: .test_base
    retry:
        max: 2
        when:
            - always
    environment:
        name: safe
62
    rules:
René Fritze's avatar
René Fritze committed
63
        - if: $CI_COMMIT_REF_NAME =~ /^github\/PR_.*/
64 65
          when: never
        - when: on_success
66 67 68 69 70 71 72
    stage: deploy
    script: .ci/gitlab/submit.bash

.docker-in-docker:
    tags:
      - docker-in-docker
    extends: .test_base
73
    timeout: 45 minutes
74 75 76
    retry:
        max: 2
        when:
77 78 79
            - runner_system_failure
            - stuck_or_timeout_failure
            - api_failure
80 81
            - unknown_failure
            - job_execution_timeout
82 83
    
    image: pymor/docker-in-docker:d1b5ebb4dc42a77cae82411da2e503a88bb8fb3a
84 85 86 87 88 89
    variables:
        DOCKER_HOST: tcp://docker:2375/
        DOCKER_DRIVER: overlay2
    before_script:
        - 'export SHARED_PATH="${CI_PROJECT_DIR}/shared"'
        - mkdir -p ${SHARED_PATH}
90
    services:
91 92 93
        - docker:dind
    environment:
        name: unsafe
94 95


96 97 98 99
# this should ensure binderhubs can still build a runnable image from our repo
.binder:
    extends: .docker-in-docker
    stage: install_checks
100
    needs: ["ci setup"]
101
    rules:
René Fritze's avatar
René Fritze committed
102
        - if: $CI_PIPELINE_SOURCE == "schedule"
103 104
          when: never
        - when: on_success
105 106 107 108 109 110 111 112
    variables:
        IMAGE: ${CI_REGISTRY_IMAGE}/binder:${CI_COMMIT_REF_SLUG}
        CMD: "jupyter nbconvert --to notebook --execute /pymor/.ci/ci_dummy.ipynb"
        USER: juno

.wheel:
    extends: .docker-in-docker
    stage: build
113
    rules:
René Fritze's avatar
René Fritze committed
114
        - if: $CI_PIPELINE_SOURCE == "schedule"
115 116
          when: never
        - when: on_success
117

118 119 120 121

.check_wheel:
    extends: .test_base
    stage: install_checks
122
    rules:
René Fritze's avatar
René Fritze committed
123
        - if: $CI_PIPELINE_SOURCE == "schedule"
124 125
          when: never
        - when: on_success
126
    services:
127 128
      - pymor/devpi:1
    dependencies:
129
      - "wheel 1 py3 6"
130 131
      - "wheel 2010 py3 6"
      - "wheel 2014 py3 6"
132
      - "wheel 1 py3 7"
133 134
      - "wheel 2010 py3 7"
      - "wheel 2014 py3 7"
135
      - "wheel 1 py3 8"
136 137
      - "wheel 2010 py3 8"
      - "wheel 2014 py3 8"
138
    needs: ["wheel 1 py3 6","wheel 2010 py3 6","wheel 2014 py3 6","wheel 1 py3 7","wheel 2010 py3 7","wheel 2014 py3 7","wheel 1 py3 8","wheel 2010 py3 8","wheel 2014 py3 8",]
139 140 141 142 143 144 145
    before_script:
      - pip3 install devpi-client
      - devpi use http://pymor__devpi:3141/root/public --set-cfg
      - devpi login root --password none
      - devpi upload --from-dir --formats=* ./shared
    # the docker service adressing fails on other runners
    tags: [mike]
146

147 148
.sanity_checks:
    extends: .test_base
René Fritze's avatar
René Fritze committed
149
    image: pymor/ci_sanity:6482589aa9345c76ae77437661ecb4d67a1963d4
150
    stage: sanity
151
#******** end definition of base jobs *********************************************************************************#
152

153 154 155 156
# https://docs.gitlab.com/ee/ci/yaml/README.html#workflowrules-templates
include:
  - template: 'Workflows/Branch-Pipelines.gitlab-ci.yml'

157 158 159 160 161
#******* sanity stage

# this step makes sure that on older python our install fails with
# a nice message ala "python too old" instead of "SyntaxError"
verify setup.py:
162
    extends: .sanity_checks
163
    script:
164
        - python3 setup.py egg_info
165 166

ci setup:
167 168 169
    extends: .sanity_checks
    script:
        - ${CI_PROJECT_DIR}/.ci/gitlab/ci_sanity_check.bash "3.6 3.7 3.8"
170 171

#****** test stage
172

173 174
minimal_cpp_demo:
    extends: .pytest
175
    rules:
René Fritze's avatar
René Fritze committed
176
        - if: $CI_PIPELINE_SOURCE == "schedule"
177 178
          when: never
        - when: on_success
179
    services:
René Fritze's avatar
René Fritze committed
180
        - name: pymor/pypi-mirror_stable_py3.7:6482589aa9345c76ae77437661ecb4d67a1963d4
181
          alias: pypi_mirror
René Fritze's avatar
René Fritze committed
182
    image: pymor/testing_py3.7:6482589aa9345c76ae77437661ecb4d67a1963d4
183
    script: ./.ci/gitlab/cpp_demo.bash
184
mpi 3 6:
185
    extends: .pytest
186
    rules:
René Fritze's avatar
René Fritze committed
187
        - if: $CI_PIPELINE_SOURCE == "schedule"
188 189
          when: never
        - when: on_success
190
    services:
René Fritze's avatar
René Fritze committed
191
        - name: pymor/pypi-mirror_stable_py3.6:6482589aa9345c76ae77437661ecb4d67a1963d4
192
          alias: pypi_mirror
René Fritze's avatar
René Fritze committed
193
    image: pymor/testing_py3.6:6482589aa9345c76ae77437661ecb4d67a1963d4
194 195
    script:
        - |
196
          if [[ "$CI_COMMIT_REF_NAME" == *"github/PR_"* ]]; then
197 198 199 200 201 202 203
            echo selecting hypothesis profile "ci_pr" for branch $CI_COMMIT_REF_NAME
            export PYMOR_HYPOTHESIS_PROFILE="ci_pr"
          else
            echo selecting hypothesis profile "ci" for branch $CI_COMMIT_REF_NAME
            export PYMOR_HYPOTHESIS_PROFILE="ci"
          fi
        - ./.ci/gitlab/test_mpi.bash
204
mpi 3 7:
205
    extends: .pytest
206
    rules:
René Fritze's avatar
René Fritze committed
207
        - if: $CI_PIPELINE_SOURCE == "schedule"
208 209
          when: never
        - when: on_success
210
    services:
René Fritze's avatar
René Fritze committed
211
        - name: pymor/pypi-mirror_stable_py3.7:6482589aa9345c76ae77437661ecb4d67a1963d4
212
          alias: pypi_mirror
René Fritze's avatar
René Fritze committed
213
    image: pymor/testing_py3.7:6482589aa9345c76ae77437661ecb4d67a1963d4
214 215
    script:
        - |
216
          if [[ "$CI_COMMIT_REF_NAME" == *"github/PR_"* ]]; then
217 218 219 220 221 222 223
            echo selecting hypothesis profile "ci_pr" for branch $CI_COMMIT_REF_NAME
            export PYMOR_HYPOTHESIS_PROFILE="ci_pr"
          else
            echo selecting hypothesis profile "ci" for branch $CI_COMMIT_REF_NAME
            export PYMOR_HYPOTHESIS_PROFILE="ci"
          fi
        - ./.ci/gitlab/test_mpi.bash
224
mpi 3 8:
René Fritze's avatar
René Fritze committed
225
    extends: .pytest
226
    rules:
René Fritze's avatar
René Fritze committed
227
        - if: $CI_PIPELINE_SOURCE == "schedule"
228 229
          when: never
        - when: on_success
230
    services:
René Fritze's avatar
René Fritze committed
231
        - name: pymor/pypi-mirror_stable_py3.8:6482589aa9345c76ae77437661ecb4d67a1963d4
232
          alias: pypi_mirror
René Fritze's avatar
René Fritze committed
233
    image: pymor/testing_py3.8:6482589aa9345c76ae77437661ecb4d67a1963d4
234 235
    script:
        - |
236
          if [[ "$CI_COMMIT_REF_NAME" == *"github/PR_"* ]]; then
237 238 239 240 241 242 243
            echo selecting hypothesis profile "ci_pr" for branch $CI_COMMIT_REF_NAME
            export PYMOR_HYPOTHESIS_PROFILE="ci_pr"
          else
            echo selecting hypothesis profile "ci" for branch $CI_COMMIT_REF_NAME
            export PYMOR_HYPOTHESIS_PROFILE="ci"
          fi
        - ./.ci/gitlab/test_mpi.bash
244
notebooks_dir 3 6:
245
    extends: .pytest
246
    rules:
René Fritze's avatar
René Fritze committed
247
        - if: $CI_PIPELINE_SOURCE == "schedule"
248 249
          when: never
        - when: on_success
250
    services:
René Fritze's avatar
René Fritze committed
251
        - name: pymor/pypi-mirror_stable_py3.6:6482589aa9345c76ae77437661ecb4d67a1963d4
252
          alias: pypi_mirror
René Fritze's avatar
René Fritze committed
253
    image: pymor/testing_py3.6:6482589aa9345c76ae77437661ecb4d67a1963d4
254 255
    script:
        - |
256
          if [[ "$CI_COMMIT_REF_NAME" == *"github/PR_"* ]]; then
257 258 259 260 261 262 263
            echo selecting hypothesis profile "ci_pr" for branch $CI_COMMIT_REF_NAME
            export PYMOR_HYPOTHESIS_PROFILE="ci_pr"
          else
            echo selecting hypothesis profile "ci" for branch $CI_COMMIT_REF_NAME
            export PYMOR_HYPOTHESIS_PROFILE="ci"
          fi
        - ./.ci/gitlab/test_notebooks_dir.bash
264
notebooks_dir 3 7:
265
    extends: .pytest
266
    rules:
René Fritze's avatar
René Fritze committed
267
        - if: $CI_PIPELINE_SOURCE == "schedule"
268 269
          when: never
        - when: on_success
270
    services:
René Fritze's avatar
René Fritze committed
271
        - name: pymor/pypi-mirror_stable_py3.7:6482589aa9345c76ae77437661ecb4d67a1963d4
272
          alias: pypi_mirror
René Fritze's avatar
René Fritze committed
273
    image: pymor/testing_py3.7:6482589aa9345c76ae77437661ecb4d67a1963d4
274 275
    script:
        - |
276
          if [[ "$CI_COMMIT_REF_NAME" == *"github/PR_"* ]]; then
277 278 279 280 281 282 283
            echo selecting hypothesis profile "ci_pr" for branch $CI_COMMIT_REF_NAME
            export PYMOR_HYPOTHESIS_PROFILE="ci_pr"
          else
            echo selecting hypothesis profile "ci" for branch $CI_COMMIT_REF_NAME
            export PYMOR_HYPOTHESIS_PROFILE="ci"
          fi
        - ./.ci/gitlab/test_notebooks_dir.bash
284
notebooks_dir 3 8:
285
    extends: .pytest
286
    rules:
René Fritze's avatar
René Fritze committed
287
        - if: $CI_PIPELINE_SOURCE == "schedule"
288 289
          when: never
        - when: on_success
290
    services:
René Fritze's avatar
René Fritze committed
291
        - name: pymor/pypi-mirror_stable_py3.8:6482589aa9345c76ae77437661ecb4d67a1963d4
292
          alias: pypi_mirror
René Fritze's avatar
René Fritze committed
293
    image: pymor/testing_py3.8:6482589aa9345c76ae77437661ecb4d67a1963d4
294 295
    script:
        - |
296
          if [[ "$CI_COMMIT_REF_NAME" == *"github/PR_"* ]]; then
297 298 299 300 301 302 303
            echo selecting hypothesis profile "ci_pr" for branch $CI_COMMIT_REF_NAME
            export PYMOR_HYPOTHESIS_PROFILE="ci_pr"
          else
            echo selecting hypothesis profile "ci" for branch $CI_COMMIT_REF_NAME
            export PYMOR_HYPOTHESIS_PROFILE="ci"
          fi
        - ./.ci/gitlab/test_notebooks_dir.bash
304
pip_installed 3 6:
René Fritze's avatar
René Fritze committed
305
    extends: .pytest
306
    rules:
René Fritze's avatar
René Fritze committed
307
        - if: $CI_PIPELINE_SOURCE == "schedule"
308 309
          when: never
        - when: on_success
310
    services:
René Fritze's avatar
René Fritze committed
311
        - name: pymor/pypi-mirror_stable_py3.6:6482589aa9345c76ae77437661ecb4d67a1963d4
312
          alias: pypi_mirror
René Fritze's avatar
René Fritze committed
313
    image: pymor/testing_py3.6:6482589aa9345c76ae77437661ecb4d67a1963d4
314 315
    script:
        - |
316
          if [[ "$CI_COMMIT_REF_NAME" == *"github/PR_"* ]]; then
317 318 319 320 321 322 323
            echo selecting hypothesis profile "ci_pr" for branch $CI_COMMIT_REF_NAME
            export PYMOR_HYPOTHESIS_PROFILE="ci_pr"
          else
            echo selecting hypothesis profile "ci" for branch $CI_COMMIT_REF_NAME
            export PYMOR_HYPOTHESIS_PROFILE="ci"
          fi
        - ./.ci/gitlab/test_pip_installed.bash
324
pip_installed 3 7:
325
    extends: .pytest
326
    rules:
René Fritze's avatar
René Fritze committed
327
        - if: $CI_PIPELINE_SOURCE == "schedule"
328 329
          when: never
        - when: on_success
330
    services:
René Fritze's avatar
René Fritze committed
331
        - name: pymor/pypi-mirror_stable_py3.7:6482589aa9345c76ae77437661ecb4d67a1963d4
332
          alias: pypi_mirror
René Fritze's avatar
René Fritze committed
333
    image: pymor/testing_py3.7:6482589aa9345c76ae77437661ecb4d67a1963d4
334 335
    script:
        - |
336
          if [[ "$CI_COMMIT_REF_NAME" == *"github/PR_"* ]]; then
337 338 339 340 341 342 343
            echo selecting hypothesis profile "ci_pr" for branch $CI_COMMIT_REF_NAME
            export PYMOR_HYPOTHESIS_PROFILE="ci_pr"
          else
            echo selecting hypothesis profile "ci" for branch $CI_COMMIT_REF_NAME
            export PYMOR_HYPOTHESIS_PROFILE="ci"
          fi
        - ./.ci/gitlab/test_pip_installed.bash
344
pip_installed 3 8:
René Fritze's avatar
René Fritze committed
345
    extends: .pytest
346
    rules:
René Fritze's avatar
René Fritze committed
347
        - if: $CI_PIPELINE_SOURCE == "schedule"
348 349
          when: never
        - when: on_success
René Fritze's avatar
René Fritze committed
350
    services:
René Fritze's avatar
René Fritze committed
351
        - name: pymor/pypi-mirror_stable_py3.8:6482589aa9345c76ae77437661ecb4d67a1963d4
René Fritze's avatar
René Fritze committed
352
          alias: pypi_mirror
René Fritze's avatar
René Fritze committed
353
    image: pymor/testing_py3.8:6482589aa9345c76ae77437661ecb4d67a1963d4
354 355
    script:
        - |
356
          if [[ "$CI_COMMIT_REF_NAME" == *"github/PR_"* ]]; then
357 358 359 360 361 362 363
            echo selecting hypothesis profile "ci_pr" for branch $CI_COMMIT_REF_NAME
            export PYMOR_HYPOTHESIS_PROFILE="ci_pr"
          else
            echo selecting hypothesis profile "ci" for branch $CI_COMMIT_REF_NAME
            export PYMOR_HYPOTHESIS_PROFILE="ci"
          fi
        - ./.ci/gitlab/test_pip_installed.bash
364
vanilla 3 6:
René Fritze's avatar
René Fritze committed
365
    extends: .pytest
366
    rules:
René Fritze's avatar
René Fritze committed
367
        - if: $CI_PIPELINE_SOURCE == "schedule"
368 369
          when: never
        - when: on_success
René Fritze's avatar
René Fritze committed
370
    services:
René Fritze's avatar
René Fritze committed
371
        - name: pymor/pypi-mirror_stable_py3.6:6482589aa9345c76ae77437661ecb4d67a1963d4
René Fritze's avatar
René Fritze committed
372
          alias: pypi_mirror
René Fritze's avatar
René Fritze committed
373
    image: pymor/testing_py3.6:6482589aa9345c76ae77437661ecb4d67a1963d4
374 375
    script:
        - |
376
          if [[ "$CI_COMMIT_REF_NAME" == *"github/PR_"* ]]; then
377 378 379 380 381 382 383
            echo selecting hypothesis profile "ci_pr" for branch $CI_COMMIT_REF_NAME
            export PYMOR_HYPOTHESIS_PROFILE="ci_pr"
          else
            echo selecting hypothesis profile "ci" for branch $CI_COMMIT_REF_NAME
            export PYMOR_HYPOTHESIS_PROFILE="ci"
          fi
        - ./.ci/gitlab/test_vanilla.bash
384
vanilla 3 7:
René Fritze's avatar
René Fritze committed
385
    extends: .pytest
386
    rules:
René Fritze's avatar
René Fritze committed
387
        - if: $CI_PIPELINE_SOURCE == "schedule"
388 389
          when: never
        - when: on_success
René Fritze's avatar
René Fritze committed
390
    services:
René Fritze's avatar
René Fritze committed
391
        - name: pymor/pypi-mirror_stable_py3.7:6482589aa9345c76ae77437661ecb4d67a1963d4
René Fritze's avatar
René Fritze committed
392
          alias: pypi_mirror
René Fritze's avatar
René Fritze committed
393
    image: pymor/testing_py3.7:6482589aa9345c76ae77437661ecb4d67a1963d4
394 395
    script:
        - |
396
          if [[ "$CI_COMMIT_REF_NAME" == *"github/PR_"* ]]; then
397 398 399 400 401 402 403
            echo selecting hypothesis profile "ci_pr" for branch $CI_COMMIT_REF_NAME
            export PYMOR_HYPOTHESIS_PROFILE="ci_pr"
          else
            echo selecting hypothesis profile "ci" for branch $CI_COMMIT_REF_NAME
            export PYMOR_HYPOTHESIS_PROFILE="ci"
          fi
        - ./.ci/gitlab/test_vanilla.bash
404
vanilla 3 8:
René Fritze's avatar
René Fritze committed
405
    extends: .pytest
406
    rules:
René Fritze's avatar
René Fritze committed
407
        - if: $CI_PIPELINE_SOURCE == "schedule"
408 409
          when: never
        - when: on_success
René Fritze's avatar
René Fritze committed
410
    services:
René Fritze's avatar
René Fritze committed
411
        - name: pymor/pypi-mirror_stable_py3.8:6482589aa9345c76ae77437661ecb4d67a1963d4
René Fritze's avatar
René Fritze committed
412
          alias: pypi_mirror
René Fritze's avatar
René Fritze committed
413
    image: pymor/testing_py3.8:6482589aa9345c76ae77437661ecb4d67a1963d4
414 415
    script:
        - |
416
          if [[ "$CI_COMMIT_REF_NAME" == *"github/PR_"* ]]; then
417 418 419 420 421 422 423
            echo selecting hypothesis profile "ci_pr" for branch $CI_COMMIT_REF_NAME
            export PYMOR_HYPOTHESIS_PROFILE="ci_pr"
          else
            echo selecting hypothesis profile "ci" for branch $CI_COMMIT_REF_NAME
            export PYMOR_HYPOTHESIS_PROFILE="ci"
          fi
        - ./.ci/gitlab/test_vanilla.bash
424
numpy_git 3 8:
425
    extends: .pytest
426
    rules:
René Fritze's avatar
René Fritze committed
427
        - if: $CI_PIPELINE_SOURCE == "schedule"
428 429
          when: never
        - when: on_success
430
    services:
René Fritze's avatar
René Fritze committed
431
        - name: pymor/pypi-mirror_stable_py3.8:6482589aa9345c76ae77437661ecb4d67a1963d4
432
          alias: pypi_mirror
René Fritze's avatar
René Fritze committed
433
    image: pymor/testing_py3.8:6482589aa9345c76ae77437661ecb4d67a1963d4
434 435
    script:
        - |
436
          if [[ "$CI_COMMIT_REF_NAME" == *"github/PR_"* ]]; then
437 438 439 440 441 442 443
            echo selecting hypothesis profile "ci_pr" for branch $CI_COMMIT_REF_NAME
            export PYMOR_HYPOTHESIS_PROFILE="ci_pr"
          else
            echo selecting hypothesis profile "ci" for branch $CI_COMMIT_REF_NAME
            export PYMOR_HYPOTHESIS_PROFILE="ci"
          fi
        - ./.ci/gitlab/test_numpy_git.bash
444
oldest 3 6:
445
    extends: .pytest
446
    rules:
René Fritze's avatar
René Fritze committed
447
        - if: $CI_PIPELINE_SOURCE == "schedule"
448 449
          when: never
        - when: on_success
450
    services:
René Fritze's avatar
René Fritze committed
451
        - name: pymor/pypi-mirror_oldest_py3.6:6482589aa9345c76ae77437661ecb4d67a1963d4
452
          alias: pypi_mirror
René Fritze's avatar
René Fritze committed
453
    image: pymor/testing_py3.6:6482589aa9345c76ae77437661ecb4d67a1963d4
454 455
    script:
        - |
456
          if [[ "$CI_COMMIT_REF_NAME" == *"github/PR_"* ]]; then
457 458 459 460 461 462 463
            echo selecting hypothesis profile "ci_pr" for branch $CI_COMMIT_REF_NAME
            export PYMOR_HYPOTHESIS_PROFILE="ci_pr"
          else
            echo selecting hypothesis profile "ci" for branch $CI_COMMIT_REF_NAME
            export PYMOR_HYPOTHESIS_PROFILE="ci"
          fi
        - ./.ci/gitlab/test_oldest.bash
464 465
ci_weekly 3 6:
    extends: .pytest
466
    timeout: 5h
467
    rules:
René Fritze's avatar
René Fritze committed
468
        - if: $CI_PIPELINE_SOURCE == "schedule"
469
          when: always
470
    services:
René Fritze's avatar
René Fritze committed
471
        - name: pymor/pypi-mirror_stable_py3.6:6482589aa9345c76ae77437661ecb4d67a1963d4
472
          alias: pypi_mirror
René Fritze's avatar
René Fritze committed
473
    image: pymor/testing_py3.6:6482589aa9345c76ae77437661ecb4d67a1963d4
474 475 476 477
    
    script: ./.ci/gitlab/test_vanilla.bash
ci_weekly 3 7:
    extends: .pytest
478
    timeout: 5h
479
    rules:
René Fritze's avatar
René Fritze committed
480
        - if: $CI_PIPELINE_SOURCE == "schedule"
481
          when: always
482
    services:
René Fritze's avatar
René Fritze committed
483
        - name: pymor/pypi-mirror_stable_py3.7:6482589aa9345c76ae77437661ecb4d67a1963d4
484
          alias: pypi_mirror
René Fritze's avatar
René Fritze committed
485
    image: pymor/testing_py3.7:6482589aa9345c76ae77437661ecb4d67a1963d4
486 487 488 489
    
    script: ./.ci/gitlab/test_vanilla.bash
ci_weekly 3 8:
    extends: .pytest
490
    timeout: 5h
491
    rules:
René Fritze's avatar
René Fritze committed
492
        - if: $CI_PIPELINE_SOURCE == "schedule"
493
          when: always
494
    services:
René Fritze's avatar
René Fritze committed
495
        - name: pymor/pypi-mirror_stable_py3.8:6482589aa9345c76ae77437661ecb4d67a1963d4
496
          alias: pypi_mirror
René Fritze's avatar
René Fritze committed
497
    image: pymor/testing_py3.8:6482589aa9345c76ae77437661ecb4d67a1963d4
498 499
    
    script: ./.ci/gitlab/test_vanilla.bash
500
submit vanilla 3 6:
501
    extends: .submit
502
    rules:
René Fritze's avatar
René Fritze committed
503
        - if: $CI_PIPELINE_SOURCE == "schedule"
504 505
          when: never
        - when: on_success
506
    image: pymor/python:3.6
René Fritze's avatar
René Fritze committed
507 508
    variables:
        COVERAGE_FLAG: vanilla
509
    dependencies:
510
        - vanilla 3 6
511
    needs: ["vanilla 3 6"]
512
submit vanilla 3 7:
513
    extends: .submit
514
    rules:
René Fritze's avatar
René Fritze committed
515
        - if: $CI_PIPELINE_SOURCE == "schedule"
516 517
          when: never
        - when: on_success
518
    image: pymor/python:3.7
René Fritze's avatar
René Fritze committed
519 520
    variables:
        COVERAGE_FLAG: vanilla
521
    dependencies:
522
        - vanilla 3 7
523
    needs: ["vanilla 3 7"]
524
submit vanilla 3 8:
René Fritze's avatar
René Fritze committed
525
    extends: .submit
526
    rules:
René Fritze's avatar
René Fritze committed
527
        - if: $CI_PIPELINE_SOURCE == "schedule"
528 529
          when: never
        - when: on_success
René Fritze's avatar
René Fritze committed
530
    image: pymor/python:3.8
René Fritze's avatar
René Fritze committed
531 532
    variables:
        COVERAGE_FLAG: vanilla
René Fritze's avatar
René Fritze committed
533
    dependencies:
534
        - vanilla 3 8
535
    needs: ["vanilla 3 8"]
536
submit numpy_git 3 8:
537
    extends: .submit
538
    rules:
René Fritze's avatar
René Fritze committed
539
        - if: $CI_PIPELINE_SOURCE == "schedule"
540 541
          when: never
        - when: on_success
542
    image: pymor/python:3.8
René Fritze's avatar
René Fritze committed
543 544
    variables:
        COVERAGE_FLAG: numpy_git
545
    dependencies:
546
        - numpy_git 3 8
547
    needs: ["numpy_git 3 8"]
548
submit oldest 3 6:
René Fritze's avatar
René Fritze committed
549
    extends: .submit
550
    rules:
René Fritze's avatar
René Fritze committed
551
        - if: $CI_PIPELINE_SOURCE == "schedule"
552 553
          when: never
        - when: on_success
554
    image: pymor/python:3.6
René Fritze's avatar
René Fritze committed
555 556
    variables:
        COVERAGE_FLAG: oldest
René Fritze's avatar
René Fritze committed
557
    dependencies:
558
        - oldest 3 6
559
    needs: ["oldest 3 6"]
560 561
submit ci_weekly 3 6:
    extends: .submit
562
    rules:
René Fritze's avatar
René Fritze committed
563
        - if: $CI_PIPELINE_SOURCE == "schedule"
564
          when: always
565 566 567 568 569
    image: pymor/python:3.6
    variables:
        COVERAGE_FLAG: ci_weekly
    dependencies:
        - ci_weekly 3 6
570
    needs: ["ci_weekly 3 6"]
571 572
submit ci_weekly 3 7:
    extends: .submit
573
    rules:
René Fritze's avatar
René Fritze committed
574
        - if: $CI_PIPELINE_SOURCE == "schedule"
575
          when: always
576 577 578 579 580
    image: pymor/python:3.7
    variables:
        COVERAGE_FLAG: ci_weekly
    dependencies:
        - ci_weekly 3 7
581
    needs: ["ci_weekly 3 7"]
582 583
submit ci_weekly 3 8:
    extends: .submit
584
    rules:
René Fritze's avatar
René Fritze committed
585
        - if: $CI_PIPELINE_SOURCE == "schedule"
586
          when: always
587 588 589 590 591
    image: pymor/python:3.8
    variables:
        COVERAGE_FLAG: ci_weekly
    dependencies:
        - ci_weekly 3 8
592
    needs: ["ci_weekly 3 8"]
593

594 595


596
pip 1/3:
597
    tags: [mike]
598 599 600
    services:
        - name: pymor/pypi-mirror_stable_py3.6:6482589aa9345c76ae77437661ecb4d67a1963d4
          alias: pypi_mirror
601
    rules:
René Fritze's avatar
René Fritze committed
602
        - if: $CI_PIPELINE_SOURCE == "schedule"
603 604
          when: never
        - when: on_success
René Fritze's avatar
René Fritze committed
605
    stage: install_checks
606 607
    image: pymor/deploy_checks_centos_8:6482589aa9345c76ae77437661ecb4d67a1963d4
    script: ./.ci/gitlab/install_checks/centos_8/check.bash
608 609

pip 2/3:
610
    tags: [mike]
611 612 613
    services:
        - name: pymor/pypi-mirror_stable_py3.7:6482589aa9345c76ae77437661ecb4d67a1963d4
          alias: pypi_mirror
614
    rules:
René Fritze's avatar
René Fritze committed
615
        - if: $CI_PIPELINE_SOURCE == "schedule"
616 617
          when: never
        - when: on_success
René Fritze's avatar
René Fritze committed
618
    stage: install_checks
619 620
    image: pymor/deploy_checks_debian_buster:6482589aa9345c76ae77437661ecb4d67a1963d4
    script: ./.ci/gitlab/install_checks/debian_buster/check.bash
621

622
pip 3/3:
623
    tags: [mike]
624 625 626
    services:
        - name: pymor/pypi-mirror_stable_py3.8:6482589aa9345c76ae77437661ecb4d67a1963d4
          alias: pypi_mirror
627
    rules:
René Fritze's avatar
René Fritze committed
628
        - if: $CI_PIPELINE_SOURCE == "schedule"
629 630
          when: never
        - when: on_success
René Fritze's avatar
René Fritze committed
631
    stage: install_checks
632 633
    image: pymor/deploy_checks_debian_bullseye:6482589aa9345c76ae77437661ecb4d67a1963d4
    script: ./.ci/gitlab/install_checks/debian_bullseye/check.bash
634

635

636 637
repo2docker:
    extends: .binder
638
    script:
639
        - repo2docker --user-id 2000 --user-name ${USER} --no-run --debug --image-name ${IMAGE} .
640 641 642
        - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
        - docker run ${IMAGE} ${CMD}
        - docker push ${IMAGE}
643 644 645 646 647

local_jupyter:
    extends: .binder
    script:
        - make docker_image
648
        - make DOCKER_CMD="${CMD}" docker_exec
649

650

651
trigger_binder 1/3:
652
    extends: .test_base
René Fritze's avatar
René Fritze committed
653
    stage: deploy
654
    image: alpine:3.10
655
    rules:
René Fritze's avatar
René Fritze committed
656
        - if: $CI_COMMIT_REF_NAME == "master"
657
          when: on_success
René Fritze's avatar
René Fritze committed
658
        - if: $CI_COMMIT_TAG != null
659
          when: on_success
660 661
    before_script:
        - apk --update add bash python3
662
        - pip3 install requests
663
    script:
René Fritze's avatar
René Fritze committed
664
        - python3 .ci/gitlab/trigger_binder.py "https://gke.mybinder.org/build/gh/pymor/pymor/${CI_COMMIT_REF}"
665

666
trigger_binder 2/3:
667
    extends: .test_base
René Fritze's avatar
René Fritze committed
668
    stage: deploy
669
    image: alpine:3.10
670
    rules:
René Fritze's avatar
René Fritze committed
671
        - if: $CI_COMMIT_REF_NAME == "master"
672
          when: on_success
René Fritze's avatar
René Fritze committed
673
        - if: $CI_COMMIT_TAG != null
674
          when: on_success
675 676
    before_script:
        - apk --update add bash python3
677
        - pip3 install requests
678
    script:
679
        - python3 .ci/gitlab/trigger_binder.py "https://ovh.mybinder.org/build/gh/pymor/pymor/${CI_COMMIT_REF}"
680

681
trigger_binder 3/3:
682 683 684
    extends: .test_base
    stage: deploy
    image: alpine:3.10
685
    rules:
René Fritze's avatar
René Fritze committed
686
        - if: $CI_COMMIT_REF_NAME == "master"
687
          when: on_success
René Fritze's avatar
René Fritze committed
688
        - if: $CI_COMMIT_TAG != null
689
          when: on_success
690 691 692 693
    before_script:
        - apk --update add bash python3
        - pip3 install requests
    script:
René Fritze's avatar
René Fritze committed
694
        - python3 .ci/gitlab/trigger_binder.py "https://gesis.mybinder.org/build/gh/pymor/pymor/${CI_COMMIT_REF}"
695

696 697 698 699
wheel 1 py3 6:
    extends: .wheel
    variables:
        PYVER: "3.6"
700 701
    tags:
      - amm-old-ci
702 703 704 705
    artifacts:
        paths:
        - ${CI_PROJECT_DIR}/shared/pymor*manylinux1_*whl
        expire_in: 1 week
706 707
    script: bash .ci/gitlab/wheels.bash 1

708 709 710 711
wheel 2010 py3 6:
    extends: .wheel
    variables:
        PYVER: "3.6"
712 713 714 715
    artifacts:
        paths:
        - ${CI_PROJECT_DIR}/shared/pymor*manylinux2010_*whl
        expire_in: 1 week
716
    script: bash .ci/gitlab/wheels.bash 2010
717

718 719 720 721
wheel 2014 py3 6:
    extends: .wheel
    variables:
        PYVER: "3.6"
722 723 724 725
    artifacts:
        paths:
        - ${CI_PROJECT_DIR}/shared/pymor*manylinux2014_*whl
        expire_in: 1 week
726
    script: bash .ci/gitlab/wheels.bash 2014
727 728


729 730 731 732
wheel 1 py3 7:
    extends: .wheel
    variables:
        PYVER: "3.7"
733 734
    tags:
      - amm-old-ci
735 736 737 738
    artifacts:
        paths:
        - ${CI_PROJECT_DIR}/shared/pymor*manylinux1_*whl
        expire_in: 1 week
739 740
    script: bash .ci/gitlab/wheels.bash 1

741 742 743 744
wheel 2010 py3 7:
    extends: .wheel
    variables:
        PYVER: "3.7"
745 746 747 748
    artifacts:
        paths:
        - ${CI_PROJECT_DIR}/shared/pymor*manylinux2010_*whl
        expire_in: 1 week
749 750 751 752 753 754
    script: bash .ci/gitlab/wheels.bash 2010

wheel 2014 py3 7:
    extends: .wheel
    variables:
        PYVER: "3.7"
755 756 757 758
    artifacts:
        paths:
        - ${CI_PROJECT_DIR}/shared/pymor*manylinux2014_*whl
        expire_in: 1 week
759
    script: bash .ci/gitlab/wheels.bash 2014
760

René Fritze's avatar
René Fritze committed
761

762 763 764 765
wheel 1 py3 8:
    extends: .wheel
    variables:
        PYVER: "3.8"
766 767
    tags:
      - amm-old-ci
768 769 770 771
    artifacts:
        paths:
        - ${CI_PROJECT_DIR}/shared/pymor*manylinux1_*whl
        expire_in: 1 week
772 773
    script: bash .ci/gitlab/wheels.bash 1

René Fritze's avatar
René Fritze committed
774 775 776 777
wheel 2010 py3 8:
    extends: .wheel
    variables:
        PYVER: "3.8"
778 779 780 781
    artifacts:
        paths:
        - ${CI_PROJECT_DIR}/shared/pymor*manylinux2010_*whl
        expire_in: 1 week
René Fritze's avatar
René Fritze committed
782 783 784 785 786 787
    script: bash .ci/gitlab/wheels.bash 2010

wheel 2014 py3 8:
    extends: .wheel
    variables:
        PYVER: "3.8"
788 789 790 791
    artifacts:
        paths:
        - ${CI_PROJECT_DIR}/shared/pymor*manylinux2014_*whl
        expire_in: 1 week
René Fritze's avatar
René Fritze committed
792 793 794
    script: bash .ci/gitlab/wheels.bash 2014


795

René Fritze's avatar
René Fritze committed
796
pypi deploy:
797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820
    extends: .sanity_checks
    stage: deploy
    dependencies:
      - wheel 1 py3 6
    
      - wheel 2010 py3 6
    
      - wheel 2014 py3 6
    
    
      - wheel 1 py3 7
    
      - wheel 2010 py3 7
    
      - wheel 2014 py3 7
    
    
      - wheel 1 py3 8
    
      - wheel 2010 py3 8
    
      - wheel 2014 py3 8
    
    
821
    rules:
René Fritze's avatar
René Fritze committed
822
        - if: $CI_PIPELINE_SOURCE == "schedule"
823
          when: never
René Fritze's avatar
René Fritze committed
824
        - if: $CI_COMMIT_REF_NAME =~ /^github.*/
825 826
          when: never
        - when: on_success
827 828 829 830 831
    variables:
        ARCHIVE_DIR: pyMOR_wheels-${CI_COMMIT_REF_NAME}
    artifacts:
        paths:
         - ${CI_PROJECT_DIR}/${ARCHIVE_DIR}/pymor*manylinux*whl
René Fritze's avatar
René Fritze committed
832
        expire_in: 6 months
833 834
        name: pymor-wheels
    script:
René Fritze's avatar
René Fritze committed
835
        - ${CI_PROJECT_DIR}/.ci/gitlab/pypi_deploy.bash
836 837
    environment:
        name: safe
838

839 840 841 842 843 844 845 846 847 848 849 850 851

check_wheel 1:
    extends: .check_wheel
    image: pymor/deploy_checks:devpi_centos_8
    script: devpi install pymor[full]

check_wheel 2:
    extends: .check_wheel
    image: pymor/deploy_checks:devpi_debian_buster
    script: devpi install pymor[full]

check_wheel 3:
    extends: .check_wheel
852
    image: pymor/deploy_checks:devpi_debian_bullseye
853 854 855
    script: devpi install pymor[full]