# -*- 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("example-slave", "pass", max_builds = 1), BuildSlave("OSX-slave", "pass", max_builds = 1) ] # 'slavePortnum' defines the TCP port to listen on for connections from slaves. # This must match the value configured into the buildslaves (with their # --master option) c['slavePortnum'] = 9989 ####### CHANGESOURCES # the 'change_source' setting tells the buildmaster how it should find out # about source code changes. Here we point to the CoolProp source code. from buildbot.changes.gitpoller import GitPoller c['change_source'] = [] c['change_source'].append(GitPoller( 'https://github.com/CoolProp/CoolProp', workdir='gitpoller-workdir', branch='master', pollinterval=300)) # Interval between triggering a build ####### 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.git import Git from buildbot.steps.shell import ShellCommand from buildbot.steps.slave import MakeDirectory, RemoveDirectory from buildbot.steps.transfer import DirectoryUpload def cmake_slave(mod_name, generator = "Unix Makefiles", git_mode = 'incremental', install = True): factory = BuildFactory() working_folder = "build/build/" + mod_name # check out the source factory.addStep(Git(repourl='git://github.com/CoolProp/CoolProp', mode=git_mode, submodules = True, progress=True, haltOnFailure = True)) factory.addStep(MakeDirectory(dir="build/"+working_folder, haltOnFailure = True)) factory.addStep(RemoveDirectory(dir="build/install_root", haltOnFailure = True)) factory.addStep(ShellCommand(command=["cmake", "../..", "-G", generator, "-DCOOLPROP_"+mod_name.upper()+"_MODULE=ON","-DBUILD_TESTING=ON"],workdir= working_folder, haltOnFailure = True)) if install: factory.addStep(ShellCommand(command=["make", "install"], workdir = working_folder, haltOnFailure = True)) else: factory.addStep(ShellCommand(command=["make"], workdir = working_folder, haltOnFailure = True)) factory.addStep(ShellCommand(command=["ctest", "--verbose"], workdir = working_folder, haltOnFailure = True)) if install: factory.addStep(DirectoryUpload(slavesrc="install_root",masterdest="public_html/binaries",url="binaries",compress="bz2")) return factory from buildbot.config import BuilderConfig c['builders'] = [] c['builders'].append( BuilderConfig(name="Catch-OSX", slavenames=["OSX-slave"], factory = cmake_slave('Catch', install=False) ) ) c['builders'].append( BuilderConfig(name="Java-OSX", slavenames=["OSX-slave"], factory = cmake_slave('Java') ) ) c['builders'].append( BuilderConfig(name="Csharp-OSX", slavenames=["OSX-slave"], factory = cmake_slave('Csharp') ) ) c['builders'].append( BuilderConfig(name="Octave-OSX", slavenames=["OSX-slave"], factory = cmake_slave('Octave') ) ) c['builders'].append( BuilderConfig(name="Java-linux", slavenames=["example-slave"], factory = cmake_slave('Java') ) ) c['builders'].append( BuilderConfig(name="Csharp-linux", slavenames=["example-slave"], factory = cmake_slave('Csharp') ) ) c['builders'].append( BuilderConfig(name="Octave-linux", slavenames=["example-slave"], factory = cmake_slave('Octave') ) ) all_builder_names = [builder.name for builder in c['builders']] ####### 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 from buildbot.schedulers.forcesched import ForceScheduler from buildbot.changes import filter c['schedulers'] = [] c['schedulers'].append(SingleBranchScheduler( name="all", change_filter=filter.ChangeFilter(branch='master'), treeStableTimer=None, builderNames=all_builder_names)) c['schedulers'].append(ForceScheduler( name="force", builderNames=all_builder_names)) ####### CLEANER BUILDERS # factory = BuildFactory() # factory.addStep(RemoveDirectory(dir="build/install_root", haltOnFailure = True)) # # c['builders'].append( # BuilderConfig(name="clean-linux", # slavenames=["example-slave"], # factory = factory # ) # ) # # c['builders'].append( # BuilderConfig(name="clean-OSX", # slavenames=["OSX-slave"], # factory = factory # ) # ) # # c['schedulers'].append(ForceScheduler( # name="force_clean", # builderNames=["clean-OSX","clean-linux"])) ####### 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([("cp","cp")]), gracefulShutdown = False, forceBuild = 'auth', # use this to test your slave once it is set up forceAllBuilds = True, pingBuilder = False, stopBuild = False, stopAllBuilds = False, cancelPendingBuild = False, ) c['status'].append(html.WebStatus(http_port=8010, 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'] = "CoolProp" c['titleURL'] = "https://www.coolprop.org" # 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://localhost:8010/" ####### 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", }