[Pkg-debile-commits] [debile-master] 25/26: Added support for multiple compilers in build jobs
Sylvestre Ledru
sylvestre at alioth.debian.org
Tue Aug 20 16:22:40 UTC 2013
This is an automated email from the git hooks/post-receive script.
sylvestre pushed a commit to branch master
in repository debile-master.
commit a51911bef85ef59ee7a9764077be04e25ce96d25
Author: Léo Cavaillé <leo at cavaille.net>
Date: Fri Aug 16 14:50:55 2013 +0200
Added support for multiple compilers in build jobs
---
lucy/incoming.py | 46 +++++++++++++++++++++++++++-------------------
lucy/orm.py | 2 ++
skel/lucy.ini | 1 +
3 files changed, 30 insertions(+), 19 deletions(-)
diff --git a/lucy/incoming.py b/lucy/incoming.py
index 679e573..95369f9 100644
--- a/lucy/incoming.py
+++ b/lucy/incoming.py
@@ -129,21 +129,24 @@ def add_jobs(package):
# If this a source package, add some build jobs
if package.type == 'source' and config.getboolean('jobs', 'build-enabled'):
for arch in listize(config.get('jobs', 'arches')):
- j = Job(uuid=uuid.uuid4(),
- arch=arch,
- suite=package.suite,
- type='build',
- package=package)
-
- logging.info("Adding job type %s/%s (id %s) for package %s (%s/%s/%s)",
- package.type,
- j.type,
- j.id,
- package.name,
- package.version,
- package.suite,
- package.arch)
- session.add(j)
+ for compiler in listize(config.get('jobs', 'build-flavors')):
+ j = Job(uuid=uuid.uuid4(),
+ arch=arch,
+ suite=package.suite,
+ type='build',
+ subtype=compiler,
+ package=package)
+
+ logging.info("Adding job type %s/%s/%s (id %s) for package %s (%s/%s/%s)",
+ package.type,
+ j.type,
+ j.subtype,
+ j.id,
+ package.name,
+ package.version,
+ package.suite,
+ package.arch)
+ session.add(j)
session.commit()
@@ -182,7 +185,10 @@ def accept_binary(changes):
try:
s = session.query(Source).join(Source.jobs).filter(Job.id == job_id).one()
except NoResultFound:
- return reject(changes, 'invalid-job')
+ return reject(changes, 'job-with-no-source')
+
+ if j.type != "build":
+ return reject(changes, 'job-not-build')
buildd = session.query(Machine).filter(Machine.gpg_fingerprint == key).first()
if not buildd:
@@ -198,17 +204,19 @@ def accept_binary(changes):
deb=bfilename,
arch=arch,
suite=suite,
- run=int(s.run))
+ run=int(s.run),
+ compiler_type=j.subtype)
session.add(b)
session.commit()
add_jobs(b)
path = move_to_pool_binary(b, bfilename, root=arch)
- logging.info("Accepted binary package : %s / %s (%s/%s)",
+ logging.info("Accepted binary package : %s / %s (%s/%s) from compiler %s",
b.name,
b.version,
b.suite,
- b.arch)
+ b.arch,
+ b.compiler_type)
os.unlink(changes.get_filename())
def reject(changes, reason):
diff --git a/lucy/orm.py b/lucy/orm.py
index de1b436..4106bbf 100644
--- a/lucy/orm.py
+++ b/lucy/orm.py
@@ -100,6 +100,7 @@ class Binary(Package):
group = relationship("Group", backref=backref('binaries', order_by=name))
run = Column(Integer)
deb = Column(String(100))
+ compiler_type = Column(String(100))
def serialize(self):
binary_dict = row2dict(self)
binary_dict['type'] = 'binary'
@@ -115,6 +116,7 @@ class Job(Base):
machine_id = Column(Integer, ForeignKey('machines.id'))
machine = relationship("Machine", backref=backref('jobs', order_by=id), foreign_keys=[machine_id])
type = Column(String(50), nullable=False)
+ subtype = Column(String(50))
package_id = Column(Integer, ForeignKey('packages.package_id'), nullable=False)
package = relationship("Package", backref=backref('jobs', order_by=id), foreign_keys=[package_id])
arch = Column(String(20), nullable=False)
diff --git a/skel/lucy.ini b/skel/lucy.ini
index 2193728..f8fda24 100644
--- a/skel/lucy.ini
+++ b/skel/lucy.ini
@@ -19,6 +19,7 @@ source=lintian,clanganalyzer,perlcritic
; Flag to disable the build jobs
; This will also disable the binary jobs as a consequence
build-enabled=0
+build-flavours=gcc-4.8,clang-3.3
; Idem for binary packages
binary=lintian,piuparts,adequate
; For the arches listed here by commas, lucy will create build
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-debile/debile-master.git
More information about the Pkg-debile-commits
mailing list