Maintenance will be performed on git.ligo.org, chat.ligo.org, containers.ligo.org, and docs.ligo.org on Tuesday 7th July 2020 starting at approximately 10am PDT and lasting for around 15 minutes. There will be a short period of downtime towards the end of the maintenance window. Please direct any comments, questions, or concerns to uwm-help@cgca.uwm.edu.

.gitlab-ci.yml 2.24 KB
Newer Older
1 2
stages:
  - build
Duncan Macleod's avatar
Duncan Macleod committed
3
  - test
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

# -- build ------------------
.build: &build
  stage: build
  after_script:
    - ls -l dist/
  artifacts:
    expire_in: 3h
    paths:
      - dist

build:tarball:
  <<: *build
  image: python:3.6
  script:
    - python setup.py sdist bdist_wheel

build:el7:
  <<: *build
  image: ligo/base:el7
  before_script:
    - yum install -yq
          rpm-build
          epel-rpm-macros
          python-rpm-macros
          python3-rpm-macros
          python-setuptools
          python34-setuptools
Duncan Macleod's avatar
Duncan Macleod committed
32 33
          python2-six
          python34-six
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
  script:
    - python setup.py sdist
    - rpmbuild -tb dist/ligo-gracedb*.tar.gz
    - mv -v ~/rpmbuild/RPMS/*/python*-ligo-gracedb-*.rpm dist/
    - rm -rf dist/*.tar.gz

.build:debian: &build_debian
  <<: *build
  before_script:
    - apt-get update -yqq
    - apt-get install -yq
          dpkg-dev
          debhelper
          dh-python
          python-all-dev
          python3-all-dev
          python-setuptools
          python3-setuptools
          python-six
          python3-six
          help2man
  script:
    - pushd .
    - python setup.py sdist
    - version=$(python setup.py --version)
    - cd dist
    - tar -xf ligo-gracedb-${version}.tar.gz
    - cd ligo-gracedb-${version}
    - dpkg-buildpackage -us -uc -b
    - popd
    - rm -rf dist/ligo-gracedb*

build:debian:jessie:
  <<: *build_debian
  image: debian:jessie

build:debian:stretch:
  <<: *build_debian
  image: debian:stretch
Duncan Macleod's avatar
Duncan Macleod committed
73 74


75
# -- test -------------------
Duncan Macleod's avatar
Duncan Macleod committed
76 77 78 79
.test: &test
  stage: test
  image: python
  script:
80
    - python setup.py test
Duncan Macleod's avatar
Duncan Macleod committed
81 82 83 84 85

test:python2.7:
  <<: *test
  image: python:2.7

86 87 88 89 90 91 92 93
test:python3.4:
  <<: *test
  image: python:3.4

test:python3.5:
  <<: *test
  image: python:3.5

Duncan Macleod's avatar
Duncan Macleod committed
94 95 96
test:python3.6:
  <<: *test
  image: python:3.6
97 98 99 100

test:python3.7:
  <<: *test
  image: python:3.7
101

102 103 104 105
# -- docs -------------------
# Although we don't host the docs on Gitlab Pages,
# we still want to check that they build properly.
docs:
106 107 108 109
  image: python:3.6-slim
  script:
    - apt-get update
    - apt-get install build-essential git -y
110
    - pip install -r requirements-doc.txt
111 112
    - cd docs
    - make html
Tanner Prestegard's avatar
Tanner Prestegard committed
113 114 115 116 117 118 119

# -- linting ----------------
syntax:
  image: python:3.6-slim
  script:
    - pip install -r requirements-dev.txt
    - flake8 *.py ligo/ --count