Commit ee2f605c authored by Kipp Cannon's avatar Kipp Cannon

Merge branch 'new-ci' into 'master'

Updated CI

See merge request !60
parents 730ffc51 7a7ea873
Pipeline #48995 passed with stages
in 8 minutes and 46 seconds
stages:
- build
- deploy
- test
# -- build ------------------
build:sdist:
stage: build
image: ligo/lalsuite-dev:stretch
image: python
script:
- python setup.py sdist -d .
artifacts:
......@@ -41,83 +48,145 @@ build:wheel:macos:
paths:
- '*.whl'
test:stretch:
stage: test
image: ligo/lalsuite-dev:stretch
variables:
GIT_STRATEGY: none
before_script:
- apt-get update
- 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:
- yum 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: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
# -- deploy -----------------
deploy:stretch:
.deploy:debian: &deploy-debian
stage: deploy
image: ligo/lalsuite-dev:stretch
dependencies:
- build:sdist
variables:
GIT_STRATEGY: none
before_script:
- apt-get update
- apt-get -y install lintian debhelper python-all-dev python3-all-dev
- apt-get -y install dpkg-dev devscripts lintian
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
# unpack tarball
- mkdir -p src
- tar -C ./src --strip-components 1 -xf *.tar.*
- cd src
# install build dependencies
- mk-build-deps --tool "apt-get -y" --install --remove
# build debian packages
- dpkg-buildpackage -us -uc -b
# lint
- lintian --pedantic ../*.{deb,changes}
artifacts:
paths:
- '*.deb'
- '*.changes'
deploy:el7:
deploy:stretch:
<<: *deploy-debian
image: ligo/base:stretch
.deploy:el7: &deploy-el
stage: deploy
image: ligo/base:el7
dependencies:
- build:sdist
variables:
GIT_STRATEGY: none
before_script:
- yum install -y gcc make rpm-build rpmlint yum-utils python-rpm-macros python3-rpm-macros
- yum install -y yum-utils rpm-build python34 python3-rpm-macros rpmlint
script:
# prep
- mkdir -p ~/rpmbuild/{SOURCES,SPECS}
- tar -C ~/rpmbuild/SPECS -xf *.tar.* --strip-components 2 '*/etc/glue.spec'
- mv *.tar.* ~/rpmbuild/SOURCES
# install build dependencies
- yum-builddep -y ~/rpmbuild/SPECS/*.spec
# build binary rpms
- rpmbuild -ba ~/rpmbuild/SPECS/*.spec
- mv $(find ~/rpmbuild/{RPMS,SPECS,SRPMS} -type f) .
# lint
- echo "from Config import *; addFilter(\"python-bytecode-wrong-magic-value\")" >> rpmlintrc
- rpmlint -f rpmlintrc *.{rpm,spec}
artifacts:
paths:
- '*.rpm'
- '*.spec'
deploy:el7:
<<: *deploy-el
image: ligo/base:el7
# -- test -------------------
.test: &test
stage: test
image: python
dependencies:
- build:sdist
before_script:
- python -m pip install *.tar.*
- python -m pip install lalsuite
script:
- make -C test
test:python2.7:
<<: *test
image: python:2.7
test:python3.4:
<<: *test
image: python:3.4
test:python3.5:
<<: *test
image: python:3.5
test:python3.6:
<<: *test
image: python:3.6
test:python3.7:
<<: *test
image: python:3.7
test:el7:
stage: test
image: ligo/lalsuite-dev:el7
dependencies:
- deploy:el7
- build:sdist
variables:
GIT_STRATEGY: none
script:
# install glue
- yum -y -q --nogpgcheck localinstall glue*.el7.x86_64.rpm
# extract and run the tests
- tar -xf *.tar.* --strip-components 1 lscsoft-glue*/test
- make -C test PYTHON=python
test:stretch:python2:
stage: test
image: ligo/lalsuite-dev:stretch
dependencies:
- deploy:stretch
- build:sdist
variables:
GIT_STRATEGY: none
before_script:
- apt-get update
- apt-get install -y python-lal python-lalburst
script:
- dpkg --install python-*.deb || { apt-get -y -f install; dpkg --install python-*.deb; }
# extract and run the tests
- tar -xf *.tar.* --strip-components 1 --wildcards lscsoft-glue*/test
- make -C test PYTHON=python
test:stretch:python3:
stage: test
image: ligo/lalsuite-dev:stretch
dependencies:
- deploy:stretch
- build:sdist
variables:
GIT_STRATEGY: none
before_script:
- apt-get update
- apt-get install -y python3-lal python3-lalburst
script:
- dpkg --install python3-*.deb || { apt-get -y -f install; dpkg --install python3-*.deb; }
# extract and run the tests
- tar -xf *.tar.* --strip-components 1 --wildcards lscsoft-glue*/test
- make -C test PYTHON=python3
......@@ -8,34 +8,41 @@ Source: lscsoft-%{name}-%{version}.tar.gz
Url: http://www.lsc-group.phys.uwm.edu/daswg/projects/glue.html
BuildRoot: %{_tmppath}/%{name}-%{version}-root
Requires: python-cjson pyOpenSSL numpy python-six glue-common python >= 2.7
# build requirements
BuildRequires: gcc
BuildRequires: python-rpm-macros
BuildRequires: python2-rpm-macros
BuildRequires: python3-rpm-macros
BuildRequires: python-devel
BuildRequires: python-setuptools
BuildRequires: python%{python3_version_nodots}-devel
BuildRequires: python%{python3_version_nodots}-setuptools
# testing requirements
BuildRequires: make
BuildRequires: python-matplotlib
BuildRequires: numpy
BuildRequires: python-six
BuildRequires: python2-ligo-segments
BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: python%{python3_pkgversion}-setuptools
BuildRequires: python%{python3_pkgversion}-numpy
BuildRequires: python%{python3_pkgversion}-six
BuildRequires: python%{python3_pkgversion}-ligo-segments
BuildRequires: python%{python3_version_nodots}-numpy
BuildRequires: python%{python3_version_nodots}-six
BuildRequires: python%{python3_version_nodots}-ligo-segments
Prefix: %{_exec_prefix}
%description
Glue (Grid LSC User Environment) is a suite of python modules and programs to
allow users to run LSC codes on the grid.
%package -n python%{python3_pkgversion}-glue
%package -n python%{python3_version_nodots}-glue
Summary: The Grid LSC User Environment
Group: Development/Libraries
Requires: python%{python3_pkgversion}
Requires: python%{python3_pkgversion}-numpy
Requires: python%{python3_pkgversion}-six
Requires: python%{python3_pkgversion}-glue-common
%{?python_provide:%python_provide python%{python3_pkgversion}-glue}
%description -n python%{python3_pkgversion}-glue
Requires: python%{python3_version_nodots}
Requires: python%{python3_version_nodots}-numpy
Requires: python%{python3_version_nodots}-six
Requires: python%{python3_version_nodots}-glue-common
%{?python_provide:%python_provide python%{python3_version_nodots}-glue}
%description -n python%{python3_version_nodots}-glue
Glue (Grid LSC User Environment) is a suite of python modules and programs to
allow users to run LSC codes on the grid.
......@@ -47,13 +54,13 @@ Requires: python numpy python-six
This is for the files that are common across the glue subpackages, namely
git_version, iterutils and __init__.py
%package -n python%{python3_pkgversion}-glue-common
%package -n python%{python3_version_nodots}-glue-common
Summary: The common files needed for all sub-packages
Group: Development/Libraries
Requires: python%{python3_pkgversion}
Requires: python%{python3_pkgversion}-numpy
Requires: python%{python3_pkgversion}-six
%description -n python%{python3_pkgversion}-glue-common
Requires: python%{python3_version_nodots}
Requires: python%{python3_version_nodots}-numpy
Requires: python%{python3_version_nodots}-six
%description -n python%{python3_version_nodots}-glue-common
This is for the files that are common across the glue subpackages, namely
git_version, iterutils and __init__.py
......@@ -104,7 +111,7 @@ rm -rf $RPM_BUILD_ROOT
%exclude %{python2_sitearch}/glue/git_version.py*
#%exclude %{_exec_prefix}/test/verifyutils.py
%files -n python%{python3_pkgversion}-glue
%files -n python%{python3_version_nodots}-glue
%defattr(-,root,root)
%license LICENSE
%{python3_sitearch}/lscsoft_glue-*.egg-info/
......@@ -130,7 +137,7 @@ rm -rf $RPM_BUILD_ROOT
%{python2_sitearch}/glue/git_version.py
%{python2_sitearch}/glue/git_version.pyc
%files -n python%{python3_pkgversion}-glue-common
%files -n python%{python3_version_nodots}-glue-common
%license LICENSE
%{python3_sitearch}/glue/__init__.py
%{python3_sitearch}/glue/__pycache__/__init__.cpython-%{python3_version_nodots}.pyc
......
......@@ -171,7 +171,7 @@ class Column(ligolw.Column):
>>> col[:] = [8.0, 10.0, 12.0]
>>> col[:]
[8.0, 10.0, 12.0]
>>> col.asarray()
>>> col.asarray() # doctest: +NORMALIZE_WHITESPACE
array([ 8., 10., 12.])
>>> tbl.write(sys.stdout) # doctest: +NORMALIZE_WHITESPACE
<Table Name="test">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment