.gitlab-ci.yml 1.08 KB
Newer Older
Philipp Arras's avatar
Philipp Arras committed
1
image: parras/nifty:latest
Jait Dixit's avatar
Jait Dixit committed
2

Martin Reinecke's avatar
Martin Reinecke committed
3
stages:
Philipp Arras's avatar
Philipp Arras committed
4
  - build_docker
Martin Reinecke's avatar
Martin Reinecke committed
5
  - test
Martin Reinecke's avatar
Martin Reinecke committed
6
  - release
7

Jait Dixit's avatar
Jait Dixit committed
8 9 10
variables:
  DOCKER_DRIVER: overlay

Martin Reinecke's avatar
Martin Reinecke committed
11
test_python2_scalar:
Martin Reinecke's avatar
Martin Reinecke committed
12 13
  stage: test
  script:
Martin Reinecke's avatar
Martin Reinecke committed
14
    - python setup.py install --user -f
Martin Reinecke's avatar
Martin Reinecke committed
15 16 17
    - nosetests -q --with-coverage --cover-package=nifty4 --cover-branches --cover-erase
    - >
      coverage report | grep TOTAL | awk '{ print "TOTAL: "$6; }'
18

Martin Reinecke's avatar
Martin Reinecke committed
19
test_python3_scalar:
Martin Reinecke's avatar
Martin Reinecke committed
20 21
  stage: test
  script:
Martin Reinecke's avatar
Martin Reinecke committed
22
    - python3 setup.py install --user -f
Martin Reinecke's avatar
Martin Reinecke committed
23 24 25 26 27 28
    - nosetests3 -q

test_python2_mpi:
  stage: test
  script:
    - python setup.py install --user -f
29
    - OMP_NUM_THREADS=1 mpiexec -n 2 nosetests -q 2> /dev/null
Martin Reinecke's avatar
Martin Reinecke committed
30 31 32 33 34

test_python3_mpi:
  stage: test
  script:
    - python3 setup.py install --user -f
35
    - OMP_NUM_THREADS=1 mpiexec -n 2 nosetests3 -q 2> /dev/null
Martin Reinecke's avatar
Martin Reinecke committed
36

37
pages:
Martin Reinecke's avatar
cleanup  
Martin Reinecke committed
38
  stage: release
39
  script:
Martin Reinecke's avatar
Martin Reinecke committed
40
    - python setup.py install --user -f
Martin Reinecke's avatar
Martin Reinecke committed
41
    - sh docs/generate.sh
Martin Reinecke's avatar
Martin Reinecke committed
42
    - mv docs/build/ public/
43 44
  artifacts:
    paths:
45
    - public
Martin Reinecke's avatar
cleanup  
Martin Reinecke committed
46 47
  only:
  - NIFTy_4
Philipp Arras's avatar
Philipp Arras committed
48 49 50 51 52 53 54 55 56 57

services:
  - docker:dind

build_docker_container:
  image: docker:latest
  stage: build_docker
  script:
    - docker info
    - docker build -t nifty .