Planned maintenance on Wednesday, 2021-01-20, 17:00-18:00. Expect some interruptions during that time

.gitlab-ci.yml 2.38 KB
Newer Older
Philipp Arras's avatar
Philipp Arras committed
1
image: $CONTAINER_TEST_IMAGE
Jait Dixit's avatar
Jait Dixit committed
2

Philipp Arras's avatar
Philipp Arras committed
3
variables:
Philipp Arras's avatar
Fix CI  
Philipp Arras committed
4
  CONTAINER_TEST_IMAGE: gitlab-registry.mpcdf.mpg.de/ift/nifty-dev:$CI_BUILD_REF_NAME
Martin Reinecke's avatar
Martin Reinecke committed
5
  OMP_NUM_THREADS: 1
Philipp Arras's avatar
Philipp Arras committed
6

Martin Reinecke's avatar
Martin Reinecke committed
7
stages:
Philipp Arras's avatar
Philipp Arras committed
8
  - build_docker
Philipp Arras's avatar
Philipp Arras committed
9
  - test
Philipp Arras's avatar
Philipp Arras committed
10
  - release
Philipp Arras's avatar
Philipp Arras committed
11
  - demo_runs
Philipp Arras's avatar
Change  
Philipp Arras committed
12

13
build_docker_from_scratch:
Martin Reinecke's avatar
Martin Reinecke committed
14 15
  only:
    - schedules
16 17
  image: docker:stable
  stage: build_docker
Philipp Arras's avatar
Fixup  
Philipp Arras committed
18 19
  before_script:
    - ls
20 21 22 23 24
  script:
    - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN gitlab-registry.mpcdf.mpg.de
    - docker build -t $CONTAINER_TEST_IMAGE --no-cache .
    - docker push $CONTAINER_TEST_IMAGE

Martin Reinecke's avatar
Martin Reinecke committed
25 26 27 28 29 30 31 32 33 34 35
build_docker_from_cache:
  except:
    - schedules
  image: docker:stable
  stage: build_docker
  before_script:
    - ls
  script:
    - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN gitlab-registry.mpcdf.mpg.de
    - docker build -t $CONTAINER_TEST_IMAGE .
    - docker push $CONTAINER_TEST_IMAGE
Philipp Arras's avatar
Philipp Arras committed
36

Martin Reinecke's avatar
Martin Reinecke committed
37
test_serial:
Philipp Arras's avatar
Philipp Arras committed
38 39
  stage: test
  script:
Martin Reinecke's avatar
Martin Reinecke committed
40
    - pytest-3 -q --cov=nifty5 test
Martin Reinecke's avatar
Martin Reinecke committed
41
    - >
42
      python3 -m coverage report --omit "*plot*,*distributed_do*"
Martin Reinecke's avatar
Martin Reinecke committed
43
    - >
44
      python3 -m coverage report --omit "*plot*,*distributed_do*" | grep TOTAL | awk '{ print "TOTAL: "$4; }'
Martin Reinecke's avatar
Martin Reinecke committed
45

Martin Reinecke's avatar
Martin Reinecke committed
46 47 48 49 50 51 52
test_mpi:
  stage: test
  variables:
    OMPI_MCA_btl_vader_single_copy_mechanism: none
  script:
    - mpiexec -n 2 --bind-to none pytest-3 -q test

Philipp Arras's avatar
Philipp Arras committed
53
pages:
Philipp Arras's avatar
Philipp Arras committed
54 55
  # FIXME Build only for main branch and set stage to release
  stage: test
Philipp Arras's avatar
Philipp Arras committed
56 57 58 59 60 61
  script:
    - sh docs/generate.sh
    - mv docs/build/ public/
  artifacts:
    paths:
    - public
Philipp Arras's avatar
Philipp Arras committed
62 63

before_script:
Philipp Arras's avatar
Fixup  
Philipp Arras committed
64
  - python3 setup.py install --user -f
Philipp Arras's avatar
Philipp Arras committed
65 66

run_ipynb:
Philipp Arras's avatar
Philipp Arras committed
67
  stage: demo_runs
Philipp Arras's avatar
Philipp Arras committed
68
  script:
Philipp Arras's avatar
Philipp Arras committed
69
    - jupyter nbconvert --execute --ExecutePreprocessor.timeout=None demos/Wiener_Filter.ipynb
Philipp Arras's avatar
Philipp Arras committed
70 71 72 73 74

run_getting_started_1:
  stage: demo_runs
  script:
    - python3 demos/getting_started_1.py
Martin Reinecke's avatar
fixes  
Martin Reinecke committed
75
    - mpiexec -n 2 --bind-to none python3 demos/getting_started_1.py 2> /dev/null
Philipp Arras's avatar
Philipp Arras committed
76 77 78
  artifacts:
    paths:
      - '*.png'
Philipp Arras's avatar
Philipp Arras committed
79

Martin Reinecke's avatar
Martin Reinecke committed
80 81 82 83
run_getting_started_2:
  stage: demo_runs
  script:
    - python3 demos/getting_started_2.py
Martin Reinecke's avatar
fixes  
Martin Reinecke committed
84
    - mpiexec -n 2 --bind-to none python3 demos/getting_started_2.py 2> /dev/null
Philipp Arras's avatar
Philipp Arras committed
85 86 87
  artifacts:
    paths:
      - '*.png'
Martin Reinecke's avatar
Martin Reinecke committed
88 89 90 91 92

run_getting_started_3:
  stage: demo_runs
  script:
    - python3 demos/getting_started_3.py
Philipp Arras's avatar
Philipp Arras committed
93 94 95
  artifacts:
    paths:
      - '*.png'
Philipp Arras's avatar
Philipp Arras committed
96 97 98 99 100 101 102 103

run_bernoulli:
  stage: demo_runs
  script:
    - python3 demos/bernoulli_demo.py
  artifacts:
    paths:
      - '*.png'
104 105 106 107 108 109 110 111

run_curve_fitting:
  stage: demo_runs
  script:
    - python3 demos/polynomial_fit.py
  artifacts:
    paths:
      - '*.png'