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

before_script:
  - apt-get update
  - >
15
    apt-get install -y build-essential python python-pip python-dev git
16
    autoconf gsl-bin libgsl-dev wget python-numpy cython
17
  - pip install --upgrade -r ci/requirements_base.txt
Jait Dixit's avatar
Jait Dixit committed
18 19 20 21 22 23 24 25 26 27 28
  - chmod +x ci/*.sh

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

test_mpi:
  stage: test
  script:
29 30
    - apt-get install -y openmpi-bin libopenmpi-dev
    - pip install mpi4py
31
    - ci/install_pyHealpix.sh
Jait Dixit's avatar
Jait Dixit committed
32 33 34 35 36 37 38 39 40 41
    - python setup.py build_ext --inplace
    - nosetests -vv

test_mpi_fftw:
  stage: test
  script:
    - apt-get install -y openmpi-bin libopenmpi-dev
    - >
      apt-get install -y libatlas-base-dev libfftw3-bin libfftw3-dev
      libfftw3-double3 libfftw3-long3 libfftw3-mpi-dev libfftw3-mpi3
42 43
      libfftw3-quad3 libfftw3-single3
    - pip install mpi4py
44
    - ci/install_pyHealpix.sh
45
    - ci/install_pyfftw.sh
Jait Dixit's avatar
Jait Dixit committed
46 47 48 49 50 51 52 53 54 55 56 57 58
    - python setup.py build_ext --inplace
    - nosetests -vv

test_mpi_fftw_hdf5:
  stage: test
  script:
    - apt-get install -y openmpi-bin libopenmpi-dev
    - >
      apt-get install -y libatlas-base-dev libfftw3-bin libfftw3-dev
      libfftw3-double3 libfftw3-long3 libfftw3-mpi-dev libfftw3-mpi3
      libfftw3-quad3 libfftw3-single3
    - >
      apt-get install -y libhdf5-10 libhdf5-dev libhdf5-openmpi-10
59 60
      libhdf5-openmpi-dev hdf5-tools
    - pip install mpi4py
61
    - ci/install_pyHealpix.sh
62 63
    - ci/install_h5py.sh
    - ci/install_pyfftw.sh
Jait Dixit's avatar
Jait Dixit committed
64
    - python setup.py build_ext --inplace
65
    - nosetests -vv --with-coverage --cover-package=nifty --cover-branches
Jait Dixit's avatar
Jait Dixit committed
66 67
    - >
      coverage report | grep TOTAL | awk '{ print "TOTAL: "$6; }'
Jait Dixit's avatar
Jait Dixit committed
68

69
release_image_master:
Jait Dixit's avatar
Jait Dixit committed
70 71 72 73
  image: docker:latest
  stage: release
  before_script:
    - pwd
Theo Steininger's avatar
Theo Steininger committed
74 75
  services:
    - docker:dind
Jait Dixit's avatar
Jait Dixit committed
76
  script:
77
    - docker login -u $DOCKER_HUB_USERNAME -p $DOCKER_HUB_PASSWORD
78 79 80 81 82 83 84 85 86 87
    - 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
88 89
  services:
    - docker:dind
90 91 92 93 94 95
  script:
    - docker login -u $DOCKER_HUB_USERNAME -p $DOCKER_HUB_PASSWORD
    - docker build -t $RELEASE_IMAGE_TAGGED .
    - docker push $RELEASE_IMAGE_TAGGED
  only:
    - tags