.gitlab-ci.yml 4.4 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 4
variables:
  CONTAINER_TEST_IMAGE: gitlab-registry.mpcdf.mpg.de/ift/nifty:$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
Change  
Philipp Arras committed
11

12 13 14 15 16 17 18 19 20 21 22 23 24
build_docker_from_scratch:
  only:
    - schedules
  image: docker:stable
  stage: build_docker
  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
25
  image: docker:stable
Philipp Arras's avatar
Philipp Arras committed
26 27 28 29 30
  stage: build_docker
  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
31

Martin Reinecke's avatar
Martin Reinecke committed
32
test_python2_with_coverage:
Philipp Arras's avatar
Philipp Arras committed
33 34 35
  stage: test
  script:
    - python setup.py install --user -f
Martin Reinecke's avatar
Martin Reinecke committed
36
    - mpiexec -n 2 --bind-to none nosetests -q 2> /dev/null
Philipp Arras's avatar
Philipp Arras committed
37
    - nosetests -q --with-coverage --cover-package=nifty5 --cover-erase
Martin Reinecke's avatar
Martin Reinecke committed
38
    - >
Martin Reinecke's avatar
Martin Reinecke committed
39
      coverage report --omit "*plotting*,*distributed_do*"
Martin Reinecke's avatar
Martin Reinecke committed
40
    - >
Martin Reinecke's avatar
Martin Reinecke committed
41
      coverage report --omit "*plotting*,*distributed_do*" | grep TOTAL | awk '{ print "TOTAL: "$4; }'
Philipp Arras's avatar
Philipp Arras committed
42

Martin Reinecke's avatar
Martin Reinecke committed
43
test_python3:
Philipp Arras's avatar
Philipp Arras committed
44 45 46
  stage: test
  script:
    - python3 setup.py install --user -f
Martin Reinecke's avatar
Martin Reinecke committed
47
    - mpiexec -n 2 --bind-to none nosetests3 -q 2> /dev/null
Martin Reinecke's avatar
Martin Reinecke committed
48
    - nosetests3 -q
Martin Reinecke's avatar
Martin Reinecke committed
49

Philipp Arras's avatar
Philipp Arras committed
50 51 52 53 54 55 56 57 58 59
pages:
  stage: release
  script:
    - python setup.py install --user -f
    - sh docs/generate.sh
    - mv docs/build/ public/
  artifacts:
    paths:
    - public
  only:
Martin Reinecke's avatar
Martin Reinecke committed
60
  - NIFTy_5
Philipp Arras's avatar
Philipp Arras committed
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185

before_script:
  - export MPLBACKEND="agg"

run_critical_filtering:
  stage: test
  script:
    - ls
    - python setup.py install --user -f
    - python3 setup.py install --user -f
    - python demos/critical_filtering.py
    - python3 demos/critical_filtering.py
  only:
    - run_demos

run_nonlinear_critical_filter:
  stage: test
  script:
    - python setup.py install --user -f
    - python3 setup.py install --user -f
    - python demos/nonlinear_critical_filter.py
    - python3 demos/nonlinear_critical_filter.py
  only:
    - run_demos

run_nonlinear_wiener_filter:
  stage: test
  script:
    - python setup.py install --user -f
    - python3 setup.py install --user -f
    - python demos/nonlinear_wiener_filter.py
    - python3 demos/nonlinear_wiener_filter.py
  only:
    - run_demos

run_poisson_demo:
  stage: test
  script:
    - python setup.py install --user -f
    - python3 setup.py install --user -f
    - python demos/poisson_demo.py
    - python3 demos/poisson_demo.py
  only:
    - run_demos

run_probing:
  stage: test
  script:
    - python setup.py install --user -f
    - python3 setup.py install --user -f
    - python demos/probing.py
    - python3 demos/probing.py
  only:
    - run_demos

run_sampling:
  stage: test
  script:
    - python setup.py install --user -f
    - python3 setup.py install --user -f
    - python demos/sampling.py
    - python3 demos/sampling.py
  only:
    - run_demos

run_tomography:
  stage: test
  script:
    - python setup.py install --user -f
    - python3 setup.py install --user -f
    - python demos/tomography.py
    - python3 demos/tomography.py
  only:
    - run_demos

run_wiener_filter_data_space_noiseless:
  stage: test
  script:
    - python setup.py install --user -f
    - python3 setup.py install --user -f
    - python demos/wiener_filter_data_space_noiseless.py
    - python3 demos/wiener_filter_data_space_noiseless.py
  only:
    - run_demos

run_wiener_filter_easy.py:
  stage: test
  script:
    - python setup.py install --user -f
    - python3 setup.py install --user -f
    - python demos/wiener_filter_easy.py
    - python3 demos/wiener_filter_easy.py
  only:
    - run_demos

run_wiener_filter_via_curvature.py:
  stage: test
  script:
    - pip install --user numericalunits
    - pip3 install --user numericalunits
    - python setup.py install --user -f
    - python3 setup.py install --user -f
    - python demos/wiener_filter_via_curvature.py
    - python3 demos/wiener_filter_via_curvature.py
  only:
    - run_demos

run_wiener_filter_via_hamiltonian.py:
  stage: test
  script:
    - python setup.py install --user -f
    - python3 setup.py install --user -f
    - python demos/wiener_filter_via_hamiltonian.py
    - python3 demos/wiener_filter_via_hamiltonian.py
  only:
    - run_demos

run_ipynb:
  stage: test
  script:
    - python setup.py install --user -f
    - python3 setup.py install --user -f
    - jupyter nbconvert --execute demos/Wiener_Filter.ipynb
  only:
    - run_demos