.gitlab-ci.yml 1.38 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 6 7 8
services:
  - docker:dind

variables:
  CONTAINER_TEST_IMAGE: gitlab-registry.mpcdf.mpg.de/ift/nifty:$CI_BUILD_REF_NAME

Martin Reinecke's avatar
Martin Reinecke committed
9
stages:
Philipp Arras's avatar
Philipp Arras committed
10
  - build_docker
Philipp Arras's avatar
Philipp Arras committed
11
  - test
Philipp Arras's avatar
Change  
Philipp Arras committed
12
  # - release
13

Philipp Arras's avatar
Change  
Philipp Arras committed
14
before_script:
Philipp Arras's avatar
Philipp Arras committed
15
  - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN gitlab-registry.mpcdf.mpg.de
Philipp Arras's avatar
Change  
Philipp Arras committed
16 17 18 19 20 21

build_docker:
  stage: build_docker
  script:
    - docker build -t $CONTAINER_TEST_IMAGE .
    - docker push $CONTAINER_TEST_IMAGE
Philipp Arras's avatar
Change  
Philipp Arras committed
22

Philipp Arras's avatar
Philipp Arras committed
23

Philipp Arras's avatar
Change  
Philipp Arras committed
24 25 26 27 28 29 30 31
# test_python2_scalar:
#   stage: test
#   script:
#     - python setup.py install --user -f
#     - nosetests -q --with-coverage --cover-package=nifty4 --cover-branches --cover-erase
#     - >
#       coverage report | grep TOTAL | awk '{ print "TOTAL: "$6; }'

Philipp Arras's avatar
Philipp Arras committed
32
test_python3_scalar:
Philipp Arras's avatar
Philipp Arras committed
33
  image: $CONTAINER_TEST_IMAGE
Philipp Arras's avatar
Philipp Arras committed
34 35 36 37
  stage: test
  script:
    - docker run $CONTAINER_TEST_IMAGE python3 setup.py install --user -f
    - docker run $CONTAINER_TEST_IMAGE nosetests3 -q
Philipp Arras's avatar
Change  
Philipp Arras committed
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61

# test_python2_mpi:
#   stage: test
#   script:
#     - python setup.py install --user -f
#     - OMP_NUM_THREADS=1 mpiexec -n 2 nosetests -q 2> /dev/null

# test_python3_mpi:
#   stage: test
#   script:
#     - python3 setup.py install --user -f
#     - OMP_NUM_THREADS=1 mpiexec -n 2 nosetests3 -q 2> /dev/null

# pages:
#   stage: release
#   script:
#     - python setup.py install --user -f
#     - sh docs/generate.sh
#     - mv docs/build/ public/
#   artifacts:
#     paths:
#     - public
#   only:
#   - NIFTy_4
Philipp Arras's avatar
Philipp Arras committed
62