Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
ligo-common
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
lscsoft
ligo-common
Commits
583f0f85
Verified
Commit
583f0f85
authored
6 years ago
by
Duncan Macleod
Browse files
Options
Downloads
Patches
Plain Diff
ci: reworked CI
parent
21cf3531
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!10
Added missing setuptools runtime dependency
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+86
-69
86 additions, 69 deletions
.gitlab-ci.yml
with
86 additions
and
69 deletions
.gitlab-ci.yml
+
86
−
69
View file @
583f0f85
stages
:
-
te
st
-
di
st
-
build
-
test
-
deploy
# -- test -------------------
.test
:
&test
before_script
:
-
python -m pip install setuptools
script
:
-
python -m pip install .
-
python -c "import ligo"
-
python setup.py test
test:2.7
:
<<
:
*test
image
:
python:2.7
test:3.4
:
<<
:
*test
image
:
python:3.4
.dist-artifacts
:
&dist-artifacts
after_script
:
# list files
-
find dist
artifacts
:
expire_in
:
18h
paths
:
-
dist
test:3.5
:
<<
:
*test
image
:
python:3.5
# -- dist -------------------
test:3.6
:
<<
:
*test
dist:tarball
:
<<
:
*dist-artifacts
stage
:
dist
image
:
python:3.6
test:3.7
:
<<
:
*test
image
:
python:3.7
script
:
-
python -m pip install setuptools
-
python setup.py sdist bdist_wheel
# -- build ------------------
.build
:
&build
<<
:
*dist-artifacts
stage
:
build
artifacts
:
expire_in
:
3h
paths
:
-
dist
dependencies
:
-
dist:tarball
build:
pypi
:
.
build:
el
:
&build-rhel
<<
:
*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
# install enough to create a src RPM and parse the build dependencies
-
yum -y -q install
yum-utils
rpm-build
python34
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
-
DIST_NAME=${CI_JOB_NAME#build:rhel:}
-
mkdir -pv dist/${DIST_NAME}
# build src rpm
-
SRC_RPM=$(rpmbuild -ts dist/ligo-common*.tar.gz | cut -d\ -f2)
# install build dependencies for src rpm
-
yum-builddep -y -q ${SRC_RPM}
# build binary rpms
-
rpmbuild --rebuild ${SRC_RPM}
# move things into dist/
-
mv -v ~/rpmbuild/RPMS/*/python*-ligo-common-*.rpm dist/${DIST_NAME}/
.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
devscripts
script
:
-
dpkg-buildpackage -b -us -uc
-
mv ../python*-ligo-common_*.deb ${DIST_PATH}/
build:debian:jessie
:
<<
:
*build_debian
image
:
debian:jessie
-
DIST_NAME=${CI_JOB_NAME#build:debian:}
-
mkdir -pv dist/${DIST_NAME}
# unpack tarball
-
mkdir -pv build
-
tar -xvf dist/ligo-common-*.tar.gz -C ./build --strip-components=1
-
pushd build
# install build dependencies
-
mk-build-deps --tool "apt-get -y" --install --remove
# build debian packages
-
dpkg-buildpackage -us -uc -b
# move things into dist/
-
popd
-
mv -v {python,python3}-ligo-common_*.deb ligo-common_*.{buildinfo,changes} dist/${DIST_NAME}/
build:rhel:el7
:
<<
:
*build-rhel
image
:
ligo/base:el7
build:debian:stretch
:
<<
:
*build_debian
image
:
debian:stretch
<<
:
*build-debian
image
:
ligo/base:stretch
# -- test -------------------
.test
:
&test
stage
:
test
image
:
python
dependencies
:
-
dist:tarball
before_script
:
-
python -m pip install dist/ligo-common-*.tar.gz
script
:
-
python -c "import ligo"
test:python2.7
:
<<
:
*test
image
:
python:2.7
test:python3.5
:
<<
:
*test
image
:
python:3.5
test:python3.6
:
<<
:
*test
image
:
python:3.6
test:python3.7
:
<<
:
*test
image
:
python:3.7
# -- deploy -----------------
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment