.gitlab-ci.yml 2.33 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
14
15
16
17
build_docker_from_scratch:
  only:
    - schedules
  image: docker:stable
  stage: build_docker
Philipp Arras's avatar
Fixup  
Philipp Arras committed
18
19
  before_script:
    - ls
20
21
22
23
24
25
26
27
  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

build_docker_from_cache:
  except:
    - schedules
Philipp Arras's avatar
Philipp Arras committed
28
  image: docker:stable
Philipp Arras's avatar
Philipp Arras committed
29
  stage: build_docker
Philipp Arras's avatar
Fixup  
Philipp Arras committed
30
31
  before_script:
    - ls
Philipp Arras's avatar
Philipp Arras committed
32
33
34
35
  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_python2_with_coverage:
Philipp Arras's avatar
Philipp Arras committed
38
39
  stage: test
  script:
Martin Reinecke's avatar
Martin Reinecke committed
40
    - mpiexec -n 2 --bind-to none nosetests -q 2> /dev/null
Philipp Arras's avatar
Philipp Arras committed
41
    - nosetests -q --with-coverage --cover-package=nifty5 --cover-erase
Martin Reinecke's avatar
Martin Reinecke committed
42
    - >
Martin Reinecke's avatar
Martin Reinecke committed
43
      coverage report --omit "*plotting*,*distributed_do*"
Martin Reinecke's avatar
Martin Reinecke committed
44
    - >
Martin Reinecke's avatar
Martin Reinecke committed
45
      coverage report --omit "*plotting*,*distributed_do*" | grep TOTAL | awk '{ print "TOTAL: "$4; }'
Philipp Arras's avatar
Philipp Arras committed
46

Martin Reinecke's avatar
Martin Reinecke committed
47
test_python3:
Philipp Arras's avatar
Philipp Arras committed
48
49
  stage: test
  script:
Martin Reinecke's avatar
Martin Reinecke committed
50
    - nosetests3 -q
Philipp Arras's avatar
Philipp Arras committed
51
    - mpiexec -n 2 --bind-to none nosetests3 -q 2> /dev/null
Martin Reinecke's avatar
Martin Reinecke committed
52

Philipp Arras's avatar
Philipp Arras committed
53
54
pages:
  stage: release
Philipp Arras's avatar
Fixup  
Philipp Arras committed
55
56
  before_script:
    - ls
Philipp Arras's avatar
Philipp Arras committed
57
58
59
60
61
62
63
64
  script:
    - python setup.py install --user -f
    - sh docs/generate.sh
    - mv docs/build/ public/
  artifacts:
    paths:
    - public
  only:
Philipp Arras's avatar
Philipp Arras committed
65
  - NIFTy_4
Philipp Arras's avatar
Philipp Arras committed
66
67
68

before_script:
  - export MPLBACKEND="agg"
Philipp Arras's avatar
Fixup  
Philipp Arras committed
69
70
  - python setup.py install --user -f
  - python3 setup.py install --user -f
Philipp Arras's avatar
Philipp Arras committed
71
72

run_ipynb:
Philipp Arras's avatar
Philipp Arras committed
73
  stage: demo_runs
Philipp Arras's avatar
Philipp Arras committed
74
  script:
Philipp Arras's avatar
Philipp Arras committed
75
    - jupyter nbconvert --execute --ExecutePreprocessor.timeout=None demos/Wiener_Filter.ipynb
Philipp Arras's avatar
Philipp Arras committed
76
77
78
  artifacts:
    paths:
      - '*.png'
Philipp Arras's avatar
Philipp Arras committed
79
80
81
82
83
84

run_getting_started_1:
  stage: demo_runs
  script:
    - python demos/getting_started_1.py
    - python3 demos/getting_started_1.py
Martin Reinecke's avatar
fixes  
Martin Reinecke committed
85
    - mpiexec -n 2 --bind-to none python3 demos/getting_started_1.py 2> /dev/null
Philipp Arras's avatar
Philipp Arras committed
86

Martin Reinecke's avatar
Martin Reinecke committed
87
88
89
90
91
run_getting_started_2:
  stage: demo_runs
  script:
    - python demos/getting_started_2.py
    - python3 demos/getting_started_2.py
Martin Reinecke's avatar
fixes  
Martin Reinecke committed
92
    - mpiexec -n 2 --bind-to none python3 demos/getting_started_2.py 2> /dev/null
Martin Reinecke's avatar
Martin Reinecke committed
93
94
95
96
97
98

run_getting_started_3:
  stage: demo_runs
  script:
    - python demos/getting_started_3.py
    - python3 demos/getting_started_3.py