.gitlab-ci.yml 2.86 KB
Newer Older
Leo P. Singer's avatar
Leo P. Singer committed
1
build:sdist:
2
3
4
5
6
7
8
9
  stage: build
  image: ligo/lalsuite-dev:stretch
  script:
    - python setup.py sdist -d .
  artifacts:
    paths:
      - '*.tar.gz'

Leo P. Singer's avatar
Leo P. Singer committed
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
build:wheel:manylinux1:
  stage: build
  image: quay.io/pypa/manylinux1_x86_64
  script:
    - set -ex;
      for PYTHON in /opt/python/*/bin/python; do
        $PYTHON setup.py bdist_wheel;
      done
    - set -ex;
      for WHEEL in dist/*; do
        auditwheel repair -w . ${WHEEL};
      done
  artifacts:
    paths:
      - '*.whl'

build:wheel:macos:
  stage: build
  tags:
    - macos
  script:
    - set -ex;
      for VIRTUALENV in /opt/local/bin/virtualenv-?.?; do
        rm -rf env;
        $VIRTUALENV --system-site-packages env;
        source env/bin/activate;
        python setup.py bdist_wheel;
      done
    - pip install delocate
    - delocate-wheel -w . dist/*
  artifacts:
    paths:
      - '*.whl'

44
45
46
47
48
49
test:stretch:
  stage: test
  image: ligo/lalsuite-dev:stretch
  variables:
    GIT_STRATEGY: none
  before_script:
Leo P. Singer's avatar
Leo P. Singer committed
50
    - apt-get update
51
52
53
54
55
56
57
58
59
60
61
62
63
    - apt-get install -y lal-python
  script:
    - tar xf *.tar.*
    - cd $(find . -type d -maxdepth 1 -name 'lscsoft-glue-*')
    - python setup.py install
    - make -C test

test:el7:
  stage: test
  image: ligo/lalsuite-dev:el7
  variables:
    GIT_STRATEGY: none
  before_script:
Leo P. Singer's avatar
Leo P. Singer committed
64
    - yum install -y lal-python
65
66
67
68
69
70
  script:
    - tar xf *.tar.*
    - cd $(find . -type d -maxdepth 1 -name 'lscsoft-glue-*')
    - python setup.py install
    - make -C test

Leo P. Singer's avatar
Leo P. Singer committed
71
72
73
74
75
76
77
78
79
80
81
82
83
84
test:stretch:python3:
  stage: test
  image: ligo/lalsuite-dev:stretch
  variables:
    GIT_STRATEGY: none
  before_script:
    - apt-get update
    - apt-get install -y lal-python3
  script:
    - tar xf *.tar.*
    - cd $(find . -type d -maxdepth 1 -name 'lscsoft-glue-*')
    - python3 setup.py install
    - make -C test PYTHON=python3

85
86
87
88
89
90
deploy:stretch:
  stage: deploy
  image: ligo/lalsuite-dev:stretch
  variables:
    GIT_STRATEGY: none
  before_script:
Leo P. Singer's avatar
Leo P. Singer committed
91
    - apt-get update
92
93
94
95
96
97
    - apt-get -y install lintian debhelper python-all-dev python3-all-dev
  script:
    - tar xf *.tar.*
    - ln -s *.tar.* $(echo *.tar.* | sed 's/\(.*\)-\(.*\).\(tar.*\)/\1_\2.orig.\3/')
    - cd $(find . -type d -maxdepth 1 -name 'lscsoft-glue-*')
    - dpkg-buildpackage -us -uc
Leo P. Singer's avatar
Leo P. Singer committed
98
    - lintian --pedantic ../*.{deb,changes}
99
100
101
102
103
104
105
  artifacts:
    paths:
      - '*.deb'
      - '*.changes'

deploy:el7:
  stage: deploy
106
  image: ligo/base:el7
107
108
109
  variables:
    GIT_STRATEGY: none
  before_script:
110
    - yum install -y gcc make rpm-build rpmlint yum-utils python3-rpm-macros
111
112
113
114
  script:
    - mkdir -p ~/rpmbuild/{SOURCES,SPECS}
    - tar -C ~/rpmbuild/SPECS -xf *.tar.* --strip-components 2 '*/etc/glue.spec'
    - mv *.tar.* ~/rpmbuild/SOURCES
115
    - yum-builddep -y ~/rpmbuild/SPECS/*.spec
116
117
    - rpmbuild -ba ~/rpmbuild/SPECS/*.spec
    - mv $(find ~/rpmbuild/{RPMS,SPECS,SRPMS} -type f) .
Leo P. Singer's avatar
Leo P. Singer committed
118
    - rpmlint *.{rpm,spec}
119
120
121
122
  artifacts:
    paths:
      - '*.rpm'
      - '*.spec'