# -*- python -*- # ex: set syntax=python: # This is a sample buildmaster config file. It must be installed as # 'master.cfg' in your buildmaster's base directory. # This is the dictionary that the buildmaster pays attention to. We also use # a shorter alias to save typing. c = BuildmasterConfig = {} ####### BUILDSLAVES # The 'slaves' list defines the set of recognized buildslaves. Each element is # a BuildSlave object, specifying a unique slave name and password. The same # slave name and password must be configured on the slave. from buildbot.buildslave import BuildSlave c['slaves'] = [ BuildSlave("gentoo-x86_64", "..."), BuildSlave("macosx-10.6-amd64", "..."), BuildSlave("freebsd-9-amd64", "..."), BuildSlave("windows-7-x64", "..."), ] # 'protocols' contains information about protocols which master will use for # communicating with slaves. # You must define at least 'port' option that slaves could connect to your master # with this protocol. # 'port' must match the value configured into the buildslaves (with their # --master option) c['protocols'] = {'pb': {'port': 9989}} ####### CHANGESOURCES # the 'change_source' setting tells the buildmaster how it should find out # about source code changes. Here we point to the buildbot clone of pyflakes. from buildbot.changes.svnpoller import SVNPoller from buildbot.changes.svnpoller import split_file_alwaystrunk, split_file_branches #from buildbot.changes.gitpoller import GitPoller c['change_source'] = [] c['change_source'].append(SVNPoller( svnurl='svn://svn.transmissionbt.com/Transmission/trunk', pollinterval=60, # split_file=split_file_branches, cachepath='/var/lib/buildmaster/svncache', svnbin='/var/lib/buildmaster/svn')) #c['change_source'].append(GitPoller( # 'git://github.com/buildbot/pyflakes.git', # workdir='gitpoller-workdir', branch='master', # pollinterval=300)) def getRevisionLink(revision_id, repository): return "https://trac.transmissionbt.com/changeset/%s/" % (revision_id) c['revlink'] = getRevisionLink ####### SCHEDULERS # Configure the Schedulers, which decide how to react to incoming changes. In this # case, just kick off a 'runtests' build from buildbot.schedulers.basic import SingleBranchScheduler, AnyBranchScheduler # from buildbot.schedulers.forcesched import ForceScheduler from buildbot.schedulers.forcesched import * from buildbot.changes import filter c['schedulers'] = [] c['schedulers'].append(SingleBranchScheduler( name="main", # change_filter=filter.ChangeFilter(branch=None), branch=None, treeStableTimer=None, builderNames=["linux-x86_64", "linux-x86_64-gcov", "macosx-amd64", "freebsd-amd64", "freebsd-amd64-cyassl", "freebsd-amd64-polarssl", "windows-x64", "windows-x64-mingw"])) c['schedulers'].append(ForceScheduler( name="force", builderNames=["linux-x86_64", "linux-x86_64-gcov", "macosx-amd64", "freebsd-amd64", "freebsd-amd64-cyassl", "freebsd-amd64-polarssl", "windows-x64", "windows-x64-mingw"], branch=FixedParameter(name="branch", default=""), revision=FixedParameter(name="revision", default=""), repository=FixedParameter(name="repository", default=""), project=FixedParameter(name="project", default=""), properties=[])) ####### BUILDERS # The 'builders' list defines the Builders, which tell Buildbot how to perform a build: # what steps, and which slaves can execute them. Note that any particular build will # only take place on one slave. from buildbot.process.factory import BuildFactory from buildbot.steps.source.svn import SVN #from buildbot.steps.source.git import Git from buildbot.steps.shell import ShellCommand from buildbot.steps.shell import Compile from buildbot.steps.slave import MakeDirectory, RemoveDirectory from buildbot.plugins import steps cmake_opts = ['-DCMAKE_BUILD_TYPE=RelWithDebInfo', '-DENABLE_CLI=ON'] cmake_opts_bsd = [] # ['-DENABLE_QT=OFF'] factory = BuildFactory() factory.addStep(SVN(workdir='src', repourl='svn://svn.transmissionbt.com/Transmission/trunk', mode='incremental', method='fresh')) factory.addStep(RemoveDirectory(dir='obj')) factory.addStep(MakeDirectory(dir='obj')) factory.addStep(ShellCommand(workdir='obj', command=['cmake', '../src', '-G', 'Unix Makefiles', '-DDHT_PREFER_STATIC_LIB=ON', '-DCMAKE_C_FLAGS=-Wno-cpp', '-DCMAKE_CXX_FLAGS=-Wno-cpp'] + cmake_opts, name='configure', description='configuring', descriptionDone='configure', haltOnFailure=True)) factory.addStep(Compile(workdir='obj', command=['make'], haltOnFailure=True)) factory.addStep(ShellCommand(workdir='obj', command=['ctest', '--output-on-failure'], name='test', description='testing', descriptionDone='test', warnOnFailure=True)) #factory.addStep(ShellCommand(workdir='obj', command=['ctest', '--verbose', '-D', 'ExperimentalMemCheck'], name='memcheck', description='memchecking', descriptionDone='memcheck', warnOnFailure=True)) factory_gcov = BuildFactory() factory_gcov.addStep(SVN(workdir='src', repourl='svn://svn.transmissionbt.com/Transmission/trunk', mode='incremental', method='fresh')) factory_gcov.addStep(RemoveDirectory(dir='obj')) factory_gcov.addStep(MakeDirectory(dir='obj')) factory_gcov.addStep(ShellCommand(workdir='obj', command=['cmake', '../src', '-G', 'Unix Makefiles', '-DDHT_PREFER_STATIC_LIB=ON', '-DENABLE_DAEMON=OFF', '-DENABLE_GTK=OFF', '-DENABLE_QT=OFF', '-DENABLE_UTILS=OFF', '-DCMAKE_BUILD_TYPE=Debug', '-DCMAKE_C_FLAGS=--coverage -Wl,-lstdc++ -Wno-cpp', '-DCMAKE_CXX_FLAGS=--coverage -Wno-cpp'], name='configure', description='configuring', descriptionDone='configure', haltOnFailure=True)) factory_gcov.addStep(Compile(workdir='obj', command=['make'], haltOnFailure=True)) factory_gcov.addStep(ShellCommand(workdir='obj', command=['ctest', '--output-on-failure'], name='test', description='testing', descriptionDone='test', haltOnFailure=True)) factory_gcov.addStep(ShellCommand(workdir='obj/libtransmission/CMakeFiles/transmission.dir', command=['lcov', '-c', '-d', '.', '-o', 'coverage.info'], name='lcov', description='running lcov', descriptionDone='lcov', haltOnFailure=True)) factory_gcov.addStep(ShellCommand(workdir='obj/libtransmission/CMakeFiles/transmission.dir', command=['lcov', '-r', 'coverage.info', '/usr/*', '-o', 'coverage.1.info'], name='lcov', description='running lcov', descriptionDone='lcov', haltOnFailure=True)) factory_gcov.addStep(ShellCommand(workdir='obj/libtransmission/CMakeFiles/transmission.dir', command=['genhtml', 'coverage.1.info', '-o', 'lcov-html'], name='genhtml', description='running genhtml', descriptionDone='genhtml', haltOnFailure=True)) factory_gcov.addStep(steps.DirectoryUpload(workdir='obj/libtransmission/CMakeFiles/transmission.dir', slavesrc='lcov-html', masterdest='/var/lib/buildmaster/public_html/lcov-results', url="/lcov-results")) factory_bsd = BuildFactory() factory_bsd.addStep(SVN(workdir='src', repourl='svn://svn.transmissionbt.com/Transmission/trunk', mode='incremental', method='fresh')) factory_bsd.addStep(RemoveDirectory(dir='obj')) factory_bsd.addStep(MakeDirectory(dir='obj')) factory_bsd.addStep(ShellCommand(workdir='obj', command=['cmake', '../src', '-G', 'Unix Makefiles', '-DDHT_PREFER_STATIC_LIB=ON'] + cmake_opts + cmake_opts_bsd, name='configure', description='configuring', descriptionDone='configure', haltOnFailure=True)) factory_bsd.addStep(Compile(workdir='obj', command=['make'], haltOnFailure=True)) factory_bsd.addStep(ShellCommand(workdir='obj', command=['ctest', '--output-on-failure'], name='test', description='testing', descriptionDone='test', warnOnFailure=True)) factory_bsd_cyassl = BuildFactory() factory_bsd_cyassl.addStep(SVN(workdir='src', repourl='svn://svn.transmissionbt.com/Transmission/trunk', mode='incremental', method='fresh')) factory_bsd_cyassl.addStep(RemoveDirectory(dir='obj')) factory_bsd_cyassl.addStep(MakeDirectory(dir='obj')) factory_bsd_cyassl.addStep(ShellCommand(workdir='obj', env={'CFLAGS':'-DCRYPTO_REFERENCE_CHECK','LDFLAGS':'-lcrypto'}, command=['cmake', '../src', '-G', 'Unix Makefiles', '-DDHT_PREFER_STATIC_LIB=ON', '-DWITH_CRYPTO=cyassl'] + cmake_opts + cmake_opts_bsd, name='configure', description='configuring', descriptionDone='configure', haltOnFailure=True)) factory_bsd_cyassl.addStep(Compile(workdir='obj', command=['make'], haltOnFailure=True)) factory_bsd_cyassl.addStep(ShellCommand(workdir='obj', command=['ctest', '--output-on-failure'], name='test', description='testing', descriptionDone='test', warnOnFailure=True)) factory_bsd_polarssl = BuildFactory() factory_bsd_polarssl.addStep(SVN(workdir='src', repourl='svn://svn.transmissionbt.com/Transmission/trunk', mode='incremental', method='fresh')) factory_bsd_polarssl.addStep(RemoveDirectory(dir='obj')) factory_bsd_polarssl.addStep(MakeDirectory(dir='obj')) factory_bsd_polarssl.addStep(ShellCommand(workdir='obj', env={'CFLAGS':'-DCRYPTO_REFERENCE_CHECK','LDFLAGS':'-lcrypto'}, command=['cmake', '../src', '-G', 'Unix Makefiles', '-DDHT_PREFER_STATIC_LIB=ON', '-DWITH_CRYPTO=polarssl'] + cmake_opts + cmake_opts_bsd, name='configure', description='configuring', descriptionDone='configure', haltOnFailure=True)) factory_bsd_polarssl.addStep(Compile(workdir='obj', command=['make'], haltOnFailure=True)) factory_bsd_polarssl.addStep(ShellCommand(workdir='obj', command=['ctest', '--output-on-failure'], name='test', description='testing', descriptionDone='test', warnOnFailure=True)) factory_mac = BuildFactory() factory_mac.addStep(SVN(workdir='src', repourl='svn://svn.transmissionbt.com/Transmission/trunk', mode='incremental', method='fresh')) factory_mac.addStep(RemoveDirectory(dir='obj')) factory_mac.addStep(MakeDirectory(dir='obj')) factory_mac.addStep(ShellCommand(workdir='obj', command=['cmake', '../src', '-G', 'Unix Makefiles', '-DUSE_QT5=ON', '-DCMAKE_PREFIX_PATH=/usr/local/opt/qt5/lib/cmake', '-DCMAKE_C_FLAGS=-Wno-#warnings', '-DCMAKE_CXX_FLAGS=-stdlib=libc++ -Wno-#warnings'] + cmake_opts, name='configure', description='configuring', descriptionDone='configure', haltOnFailure=True)) factory_mac.addStep(Compile(workdir='obj', command=['make'], haltOnFailure=True)) factory_mac.addStep(ShellCommand(workdir='obj', command=['ctest', '--output-on-failure'], name='test', description='testing', descriptionDone='test', warnOnFailure=True)) #factory_mac.addStep(ShellCommand(workdir='obj', command=['ctest', '--verbose', '-D', 'ExperimentalMemCheck'], name='memcheck', description='memchecking', descriptionDone='memcheck', warnOnFailure=True)) factory_win32 = BuildFactory() factory_win32.addStep(SVN(workdir='src', repourl='svn://svn.transmissionbt.com/Transmission/trunk', mode='full', method='fresh')) # factory_win32.addStep(ShellCommand(workdir='src', command=['patch', '-p0', '-i', '../../win32.patch'], name='patch', description='patching', descriptionDone='patch', haltOnFailure=True)) factory_win32.addStep(RemoveDirectory(dir='obj')) factory_win32.addStep(MakeDirectory(dir='obj')) # factory_win32.addStep(ShellCommand(workdir='obj', command=['vcenv-2015', 'cmake', '../src', '-G', 'NMake Makefiles', r'-DCMAKE_PREFIX_PATH=C:\buildslave-transmission\local'] + cmake_opts, name='configure', description='configuring', descriptionDone='configure', haltOnFailure=True)) factory_win32.addStep(ShellCommand(workdir='obj', command=['vcenv-2015', 'cmake', '../src', '-G', 'NMake Makefiles', r'-DCMAKE_PREFIX_PATH=C:\buildslave-transmission\local-x64-msvc14', r'-DUSE_QT5=ON'] + cmake_opts, name='configure', description='configuring', descriptionDone='configure', haltOnFailure=True)) factory_win32.addStep(Compile(workdir='obj', command=['vcenv-2015', 'nmake'], haltOnFailure=True)) factory_win32.addStep(ShellCommand(workdir='obj', command=['ctest', '--output-on-failure'], name='test', description='testing', descriptionDone='test', warnOnFailure=True)) factory_mingw = BuildFactory() factory_mingw.addStep(SVN(workdir='src', repourl='svn://svn.transmissionbt.com/Transmission/trunk', mode='full', method='fresh')) # factory_mingw.addStep(ShellCommand(workdir='src', command=['patch', '-p0', '-i', '../../win32.patch'], name='patch', description='patching', descriptionDone='patch', haltOnFailure=True)) factory_mingw.addStep(RemoveDirectory(dir='obj')) factory_mingw.addStep(MakeDirectory(dir='obj')) factory_mingw.addStep(ShellCommand(workdir='obj', command=['mingwenv-5.2', 'cmake', '../src', '-G', 'MinGW Makefiles', r'-DCMAKE_PREFIX_PATH=C:\buildslave-transmission\local-mingw', '-DCMAKE_C_FLAGS=-DCURL_STATICLIB -Wno-cpp', '-DCMAKE_CXX_FLAGS=-DCURL_STATICLIB -Wno-cpp'] + cmake_opts, name='configure', description='configuring', descriptionDone='configure', haltOnFailure=True)) factory_mingw.addStep(Compile(workdir='obj', command=['mingwenv-5.2', 'mingw32-make'], haltOnFailure=True)) factory_mingw.addStep(ShellCommand(workdir='obj', command=['ctest', '--output-on-failure'], name='test', description='testing', descriptionDone='test', warnOnFailure=True)) from buildbot.config import BuilderConfig c['builders'] = [] c['builders'].append( BuilderConfig(name="linux-x86_64", slavenames=["gentoo-x86_64"], factory=factory)) c['builders'].append( BuilderConfig(name="linux-x86_64-gcov", slavenames=["gentoo-x86_64"], factory=factory_gcov)) c['builders'].append( BuilderConfig(name="freebsd-amd64", slavenames=["freebsd-9-amd64"], factory=factory_bsd)) c['builders'].append( BuilderConfig(name="freebsd-amd64-cyassl", slavenames=["freebsd-9-amd64"], factory=factory_bsd_cyassl)) c['builders'].append( BuilderConfig(name="freebsd-amd64-polarssl", slavenames=["freebsd-9-amd64"], factory=factory_bsd_polarssl)) c['builders'].append( BuilderConfig(name="macosx-amd64", slavenames=["macosx-10.6-amd64"], # env={'CC':'/usr/local/opt/llvm/bin/clang','CXX':'/usr/local/opt/llvm/bin/clang++'}, # env={'CXXFLAGS':'-stdlib=libc++'}, factory=factory_mac)) c['builders'].append( BuilderConfig(name="windows-x64", slavenames=["windows-7-x64"], # env={'PATH':[r'C:\tools', r'C:\buildslave-transmission\local\bin', r'C:\buildslave-transmission\local\lib', r'C:\Qt\4.8.6-x64-msvc12\bin', '${PATH}'], 'QTDIR':r'C:\Qt\4.8.6-x64-msvc12'}, env={'PATH':[r'C:\tools', r'C:\buildslave-transmission\local-x64-msvc14\bin', '${PATH}']}, factory=factory_win32)) c['builders'].append( BuilderConfig(name="windows-x64-mingw", slavenames=["windows-7-x64"], # env={'PATH':[r'C:\tools', '${PATH}'], 'QTDIR':r'C:\Qt\4.8.6-x64-mingw', 'CFLAGS':'-DCURL_STATICLIB', 'CXXFLAGS':'-DCURL_STATICLIB'}, env={'PATH':[r'C:\tools', '${PATH}'], 'QTDIR':r'C:\Qt\4.8.6-x64-mingw'}, factory=factory_mingw)) ####### STATUS TARGETS # 'status' is a list of Status Targets. The results of each build will be # pushed to these targets. buildbot/status/*.py has a variety to choose from, # including web pages, email senders, and IRC bots. c['status'] = [] from buildbot.status import html from buildbot.status.web import authz, auth authz_cfg=authz.Authz( # change any of these to True to enable; see the manual for more # options auth=auth.BasicAuth([("mike","iaso1234")]), gracefulShutdown = False, forceBuild = 'auth', # use this to test your slave once it is set up forceAllBuilds = 'auth', pingBuilder = 'auth', stopBuild = 'auth', stopAllBuilds = 'auth', cancelPendingBuild = 'auth', ) c['status'].append(html.WebStatus(http_port="tcp:8010:interface=127.0.0.1", authz=authz_cfg)) ####### PROJECT IDENTITY # the 'title' string will appear at the top of this buildbot # installation's html.WebStatus home page (linked to the # 'titleURL') and is embedded in the title of the waterfall HTML page. c['title'] = "Transmission" c['titleURL'] = "https://www.transmissionbt.com/" # the 'buildbotURL' string should point to the location where the buildbot's # internal web server (usually the html.WebStatus page) is visible. This # typically uses the port number set in the Waterfall 'status' entry, but # with an externally-visible host name which the buildbot cannot figure out # without some help. c['buildbotURL'] = "http://trbb.mikedld.com/" ####### DB URL c['db'] = { # This specifies what database buildbot uses to store its state. You can leave # this at its default for all but the largest installations. 'db_url' : "sqlite:///state.sqlite", }