ci: updated CI with more tests

and tweaked binary package building
parent 730ffc51
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
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