Skip to content
Snippets Groups Projects
Commit 9ee02a3d authored by Duncan Macleod's avatar Duncan Macleod :flag_scotland:
Browse files

Merge branch 'ci' into 'master'

Added CI configuration

See merge request !2
parents aa7fdca0 45f01a9d
No related branches found
No related tags found
1 merge request!2Added CI configuration
Pipeline #
......@@ -3,3 +3,4 @@ __pycache__
MANIFEST
build
dist
/*.egg-info/
stages:
- test
- build
- deploy
# -- test -------------------
.test: &test
before_script:
- python -m pip install setuptools
script:
- python -m pip install .
- python setup.py test
test:2.7:
<<: *test
image: python:2.7
test:3.4:
<<: *test
image: python:3.4
test:3.5:
<<: *test
image: python:3.5
test:3.6:
<<: *test
image: python:3.6
# -- build ------------------
.build: &build
stage: build
artifacts:
expire_in: 3h
paths:
- dist
build:pypi:
<<: *build
image: python
script:
- python setup.py sdist bdist_wheel --universal
build:el7:
<<: *build
image: ligo/base:el7
before_script:
- mkdir -p dist/el7
- yum install -yq
rpm-build epel-rpm-macros
python-rpm-macros
python3-rpm-macros
python-setuptools
python34-setuptools
script:
- python setup.py sdist
- rpmbuild -tb dist/ligo-common-*.tar.gz
- mv ~/rpmbuild/RPMS/*/python*-ligo-common-*.rpm dist/el7/
after_script:
- rm -rf dist/*.tar.gz
.build:debian: &build_debian
<<: *build
variables:
before_script:
- DIST_PATH="dist/${CI_JOB_NAME##*:}"
- mkdir -p ${DIST_PATH}
- apt-get update -yqq
- apt-get install -yq
dpkg-dev
debhelper
dh-python
python-all-dev
python-setuptools
python3-all-dev
python3-setuptools
script:
- dpkg-buildpackage -us -uc
- mv ../python*-ligo-common_*.deb ${DIST_PATH}/
build:debian:jessie:
<<: *build_debian
image: debian:jessie
build:debian:stretch:
<<: *build_debian
image: debian:stretch
# -- deploy -----------------
deploy:
stage: deploy
image: python
script:
- python -m pip install twine
- twine upload dist/ligo-common*.tar.gz dist/ligo-common*.whl
dependencies:
- build:pypi
only:
- /^ligo-common-\d+\.\d+\.\d+([abc]\d*)?$/
except:
- branches
......@@ -12,9 +12,12 @@ License: GPL
Group: Development/Libraries
Prefix: %{_prefix}
BuildArch: noarch
BuildRequires: rpm-build
BuildRequires: epel-rpm-macros
BuildRequires: python-rpm-macros
BuildRequires: python3-rpm-macros
BuildRequires: python-setuptools
BuildRequires: python%{python3_pkgversion}-setuptools
BuildRequires: python3-rpm-macros
Vendor: Tanner Prestegard <tanner.prestegard@ligo.org>
%description
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment