.gitlab-ci.yml 1.27 KB
Newer Older
Philipp Arras's avatar
Philipp Arras committed
1
image: docker:stable
Jait Dixit's avatar
Jait Dixit committed
2

Philipp Arras's avatar
Philipp Arras committed
3 4 5
variables:
  CONTAINER_TEST_IMAGE: gitlab-registry.mpcdf.mpg.de/ift/nifty:$CI_BUILD_REF_NAME

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

Philipp Arras's avatar
Philipp Arras committed
11 12 13 14 15 16
build_docker:
  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
17

Philipp Arras's avatar
Philipp Arras committed
18
test_python2_scalar:
Philipp Arras's avatar
Fixups  
Philipp Arras committed
19
  image: $CONTAINER_TEST_IMAGE
Philipp Arras's avatar
Philipp Arras committed
20 21 22 23
  stage: test
  script:
    - python setup.py install --user -f
    - nosetests -q --with-coverage --cover-package=nifty4 --cover-branches --cover-erase
Philipp Arras's avatar
Change  
Philipp Arras committed
24

Philipp Arras's avatar
Philipp Arras committed
25
test_python3_scalar:
Philipp Arras's avatar
Philipp Arras committed
26
  image: $CONTAINER_TEST_IMAGE
Philipp Arras's avatar
Philipp Arras committed
27 28
  stage: test
  script:
Philipp Arras's avatar
Change  
Philipp Arras committed
29 30
    - python3 setup.py install --user -f
    - nosetests3 -q
Philipp Arras's avatar
Change  
Philipp Arras committed
31

Philipp Arras's avatar
Philipp Arras committed
32
test_python2_mpi:
Philipp Arras's avatar
Fixups  
Philipp Arras committed
33
  image: $CONTAINER_TEST_IMAGE
Philipp Arras's avatar
Philipp Arras committed
34 35 36 37 38 39
  stage: test
  script:
    - python setup.py install --user -f
    - OMP_NUM_THREADS=1 mpiexec -n 2 nosetests -q 2> /dev/null

test_python3_mpi:
Philipp Arras's avatar
Fixups  
Philipp Arras committed
40
  image: $CONTAINER_TEST_IMAGE
Philipp Arras's avatar
Philipp Arras committed
41 42 43 44 45 46
  stage: test
  script:
    - python3 setup.py install --user -f
    - OMP_NUM_THREADS=1 mpiexec -n 2 nosetests3 -q 2> /dev/null

pages:
Philipp Arras's avatar
Fixups  
Philipp Arras committed
47
  image: $CONTAINER_TEST_IMAGE
Philipp Arras's avatar
Philipp Arras committed
48 49 50 51 52 53 54 55 56 57
  stage: release
  script:
    - python setup.py install --user -f
    - sh docs/generate.sh
    - mv docs/build/ public/
  artifacts:
    paths:
    - public
  only:
  - NIFTy_4