.gitlab-ci.yml 1.76 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

Philipp Arras's avatar
Philipp Arras committed
32 33 34 35
test_python2_scalar:
  stage: test
  script:
    - python setup.py install --user -f
Martin Reinecke's avatar
Martin Reinecke committed
36
    - nosetests -q
Philipp Arras's avatar
Change  
Philipp Arras committed
37

Philipp Arras's avatar
Philipp Arras committed
38 39 40
test_python3_scalar:
  stage: test
  script:
Philipp Arras's avatar
Change  
Philipp Arras committed
41 42
    - python3 setup.py install --user -f
    - nosetests3 -q
Philipp Arras's avatar
Change  
Philipp Arras committed
43

Philipp Arras's avatar
Philipp Arras committed
44 45 46 47
test_python2_mpi:
  stage: test
  script:
    - python setup.py install --user -f
Martin Reinecke's avatar
Martin Reinecke committed
48
    - mpiexec -n 2 --bind-to none nosetests -q 2> /dev/null
Philipp Arras's avatar
Philipp Arras committed
49 50 51 52 53

test_python3_mpi:
  stage: test
  script:
    - python3 setup.py install --user -f
Martin Reinecke's avatar
Martin Reinecke committed
54
    - mpiexec -n 2 --bind-to none nosetests3 -q 2> /dev/null
Philipp Arras's avatar
Philipp Arras committed
55

Martin Reinecke's avatar
Martin Reinecke committed
56 57 58 59 60
test_coverage:
  stage: test
  script:
    - python setup.py install --user -f
    - mpiexec -n 2 --bind-to none nosetests -q --with-coverage --cover-package=nifty4 --cover-branches --cover-erase 2> /dev/null
Martin Reinecke's avatar
Martin Reinecke committed
61
    - nosetests -q --with-coverage --cover-package=nifty4 --cover-branches
Martin Reinecke's avatar
Martin Reinecke committed
62 63 64
    - >
      coverage report | grep TOTAL | awk '{ print "TOTAL: "$6; }'

Philipp Arras's avatar
Philipp Arras committed
65 66 67 68 69 70 71 72 73 74 75
pages:
  stage: release
  script:
    - python setup.py install --user -f
    - sh docs/generate.sh
    - mv docs/build/ public/
  artifacts:
    paths:
    - public
  only:
  - NIFTy_4