.gitlab-ci.yml 1.81 KB
Newer Older
Jait Dixit's avatar
Jait Dixit committed
1
2
3
4
5
6
7
8
image: ubuntu:latest

stages:
  - test
  - release

variables:
  DOCKER_DRIVER: overlay
9
  RELEASE_IMAGE_MASTER: iftmpa/nifty:dev
10
  RELEASE_IMAGE_TAGGED: iftmpa/nifty:$CI_BUILD_TAG
Jait Dixit's avatar
Jait Dixit committed
11
12
13

before_script:
  - apt-get update
Theo Steininger's avatar
Theo Steininger committed
14
  - chmod +x ci/*.sh
15
16
  - ci/install_basics.sh
  - pip install --upgrade -r ci/requirements.txt
Martin Reinecke's avatar
Martin Reinecke committed
17
  - pip3 install --upgrade -r ci/requirements.txt
Theo Steininger's avatar
Theo Steininger committed
18

Jait Dixit's avatar
Jait Dixit committed
19

20
test_min:
Jait Dixit's avatar
Jait Dixit committed
21
22
  stage: test
  script:
23
    - nosetests -vv
Martin Reinecke's avatar
Martin Reinecke committed
24
    - nosetests3 -vv
25
26
27
28

test_mpi:
  stage: test
  script:
29
    - ci/install_pyHealpix.sh
30
    - ci/install_mpi4py.sh
31
    - nosetests -vv
Martin Reinecke's avatar
Martin Reinecke committed
32
    - nosetests3 -vv
33
34
35
36
37
38

test_mpi_fftw:
  stage: test
  script:
    - ci/install_pyHealpix.sh
    - ci/install_mpi4py.sh
39
    - ci/install_pyfftw.sh
40
    - nosetests -vv
Martin Reinecke's avatar
Martin Reinecke committed
41
    - nosetests3 -vv
42
43
44
45
46
47
48

test_mpi_fftw_hdf5:
  stage: test
  script:
    - ci/install_pyHealpix.sh
    - ci/install_mpi4py.sh
    - ci/install_pyfftw.sh
49
    - ci/install_h5py.sh
Theo Steininger's avatar
Theo Steininger committed
50
    - mpiexec --allow-run-as-root -n 2 nosetests -x
Martin Reinecke's avatar
Martin Reinecke committed
51
    - mpiexec --allow-run-as-root -n 2 nosetests3 -x
Theo Steininger's avatar
Theo Steininger committed
52
    - mpiexec --allow-run-as-root -n 4 nosetests -x
Martin Reinecke's avatar
Martin Reinecke committed
53
    - mpiexec --allow-run-as-root -n 4 nosetests3 -x
Theo Steininger's avatar
Theo Steininger committed
54
    - nosetests -x --with-coverage --cover-package=nifty --cover-branches
Jait Dixit's avatar
Jait Dixit committed
55
56
    - >
      coverage report | grep TOTAL | awk '{ print "TOTAL: "$6; }'
Jait Dixit's avatar
Jait Dixit committed
57

58
release_image_master:
Jait Dixit's avatar
Jait Dixit committed
59
60
61
62
  image: docker:latest
  stage: release
  before_script:
    - pwd
Theo Steininger's avatar
Theo Steininger committed
63
64
  services:
    - docker:dind
Jait Dixit's avatar
Jait Dixit committed
65
  script:
66
    - docker login -u $DOCKER_HUB_USERNAME -p $DOCKER_HUB_PASSWORD
67
68
69
70
71
72
73
74
75
76
    - docker build -t $RELEASE_IMAGE_MASTER .
    - docker push $RELEASE_IMAGE_MASTER
  only:
    - master

release_image_tagged:
  image: docker:latest
  stage: release
  before_script:
    - pwd
Theo Steininger's avatar
Theo Steininger committed
77
78
  services:
    - docker:dind
79
80
81
82
83
84
  script:
    - docker login -u $DOCKER_HUB_USERNAME -p $DOCKER_HUB_PASSWORD
    - docker build -t $RELEASE_IMAGE_TAGGED .
    - docker push $RELEASE_IMAGE_TAGGED
  only:
    - tags