.gitlab-ci.yml 1.66 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
14 15
  - ci/install_basics.sh
  - pip install --upgrade -r ci/requirements.txt
Jait Dixit's avatar
Jait Dixit committed
16 17 18 19 20 21 22 23 24 25 26
  - chmod +x ci/*.sh

test_min:
  stage: test
  script:
    - python setup.py build_ext --inplace
    - nosetests -vv

test_mpi:
  stage: test
  script:
27
    - ci/install_pyHealpix.sh
28
    - ci/install_mpi4py.sh
Jait Dixit's avatar
Jait Dixit committed
29 30 31 32 33 34
    - python setup.py build_ext --inplace
    - nosetests -vv

test_mpi_fftw:
  stage: test
  script:
35
    - ci/install_pyHealpix.sh
36
    - ci/install_mpi4py.sh
37
    - ci/install_pyfftw.sh
Jait Dixit's avatar
Jait Dixit committed
38 39 40 41 42 43
    - python setup.py build_ext --inplace
    - nosetests -vv

test_mpi_fftw_hdf5:
  stage: test
  script:
44
    - ci/install_pyHealpix.sh
45
    - ci/install_mpi4py.sh
46
    - ci/install_pyfftw.sh
47
    - ci/install_h5py.sh
Jait Dixit's avatar
Jait Dixit committed
48
    - python setup.py build_ext --inplace
49
    - nosetests -vv --with-coverage --cover-package=nifty --cover-branches
Jait Dixit's avatar
Jait Dixit committed
50 51
    - >
      coverage report | grep TOTAL | awk '{ print "TOTAL: "$6; }'
Jait Dixit's avatar
Jait Dixit committed
52

53
release_image_master:
Jait Dixit's avatar
Jait Dixit committed
54 55 56 57
  image: docker:latest
  stage: release
  before_script:
    - pwd
Theo Steininger's avatar
Theo Steininger committed
58 59
  services:
    - docker:dind
Jait Dixit's avatar
Jait Dixit committed
60
  script:
61
    - docker login -u $DOCKER_HUB_USERNAME -p $DOCKER_HUB_PASSWORD
62 63 64 65 66 67 68 69 70 71
    - 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
72 73
  services:
    - docker:dind
74 75 76 77 78 79
  script:
    - docker login -u $DOCKER_HUB_USERNAME -p $DOCKER_HUB_PASSWORD
    - docker build -t $RELEASE_IMAGE_TAGGED .
    - docker push $RELEASE_IMAGE_TAGGED
  only:
    - tags