/[ascend]/branches/relerrorlist/tools/buildbot/master.cfg
ViewVC logotype

Contents of /branches/relerrorlist/tools/buildbot/master.cfg

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3231 - (show annotations) (download)
Thu Nov 2 05:50:03 2017 UTC (16 months, 2 weeks ago) by jpye
File size: 9314 byte(s)
fix link_name

1 # vim: ft=python ts=4 sw=4
2 """
3 This is the Buildbot master.cfg configuration file. We keep it at
4 /srv/ascend/buildbot/master.
5 """
6
7 from buildbot.plugins import *
8 import urllib.parse
9
10 ASCEND_SVN = "http://svn.ascend4.org/"
11
12 def SVNURL(branch):
13 if branch is "trunk":
14 return "%s%s" % (ASCEND_SVN,"trunk")
15 else:
16 return "%sbranches/%s" % (ASCEND_SVN,urllib.parse.quote_plus(branch))
17
18 ASCEND_SVN_INTERP = util.Transform(SVNURL,util.Interpolate("%(src::branch)s"))
19
20 #ASCEND_TESTS = "general_color general_dstring general_hashpjw general_list general_listio general_mem general_pool general_pretty general_stack general_table general_tm_time general_ospath general_env general_ltmatrix general_ascMalloc utilities_error utilities_ascDynaLoad utilities_ascEnvVar utilities_ascPrint utilities_ascSignal utilities_readln utilities_set linear_qrrank linear_mtx compiler_basics compiler_expr compiler_fixfree compiler_fixassign packages_defaultall solver_slv_common solver_slvreq solver_qrslv solver_fprops solver_lrslv integrator_lsode".split()
21 # solver_ipopt
22
23 # This is the dictionary that the buildmaster pays attention to. We also use
24 # a shorter alias to save typing.
25 c = BuildmasterConfig = {}
26
27 #------------------------------------------------------------------------------
28 ####### WORKERS
29
30 # The 'workers' list defines the set of recognized workers. Each element is
31 # a Worker object, specifying a unique worker name and password. The same
32 # worker name and password must be configured on the worker.
33 c['workers'] = [
34 worker.Worker("bot-ub1404"
35 ,"pwx2ub1404"
36 ,properties={'os':'ubuntu'}
37 ,max_builds=2
38 )
39 ]
40
41 WORKERS = ['bot-ub1404']
42
43 # 'protocols' contains information about protocols which master will use for
44 # communicating with workers. You must define at least 'port' option that workers
45 # could connect to your master with this protocol.
46 # 'port' must match the value configured into the workers (with their
47 # --master option)
48 c['protocols'] = {'pb': {'port': 9989}}
49
50 #------------------------------------------------------------------------------
51 ####### CHANGESOURCES
52
53 # the 'change_source' setting tells the buildmaster how it should find out
54 # about source code changes. Here we point to the buildbot clone of pyflakes.
55
56 c['change_source'] = []
57 # ASCEND
58 c['change_source'].append(changes.PBChangeSource(
59 passwd='ascend4bb'
60 ))
61
62 # CUNIT
63 #CUNIT_SVN = "https://svn.code.sf.net/p/cunit/code/"
64 #CUNIT_SVN_INTERP = util.Interpolate("%(kw:svn)s%(src::branch)s",svn=CUNIT_SVN)
65
66 #c['change_source'].append(changes.SVNPoller(
67 # repourl=CUNIT_SVN
68 # ,split_file=my_split_file_branches
69 # ,pollinterval=3600
70 #))
71
72 #from buildbot import revlinks
73 #c['revlink'] = revlinks.RevlinkMatch(
74 # repo_urls=[r'http://svn.ascend4.org/(.*)',r'(.*)']
75 #,revlink=r'http://code.ascend4.org/ascend/\1?view=revision&revision=%s'
76 # ,revlink=r'http://ascend4.org/stuff=\1'
77 #)
78 c['revlink'] = util.RevlinkMatch([r'http://svn.ascend4.org/(.*)'],
79 r'http://code.ascend4.org/ascend?view=revision&revision=%s')
80
81 c['revlink'] = util.RevlinkMatch(
82 repo_urls=[r'http://svn.ascend4.org/(.*)$'
83 ,r'/srv/ascend/svn/ascend/(.*)$'
84 ]
85 ,revlink=r'http://ascend4.org/r%s'
86 )
87
88 #------------------------------------------------------------------------------
89 ####### SCHEDULERS
90
91 # Configure the Schedulers, which decide how to react to incoming changes. In this
92 # case, just kick off a 'ascend' build
93
94 c['schedulers'] = []
95
96 # ASCEND SCHEDULERS
97
98 c['schedulers'].append(schedulers.AnyBranchScheduler(
99 name='ascendsvn'
100 ,builderNames=['ascend','ascend-lcov']
101 ,treeStableTimer=2
102 ))
103
104 c['schedulers'].append(schedulers.ForceScheduler(
105 name='force_ascend'
106 ,builderNames=['ascend','ascend-lcov']
107 ,label='Force ASCEND build'
108 ,codebases=[
109 util.CodebaseParameter(
110 ""
111 ,label="Repository"
112 ,branch=util.ChoiceStringParameter(
113 name="branch"
114 ,choices=['trunk','relerrorlist']
115 ,default='trunk'
116 )
117 ,revision=util.FixedParameter(name="revision",default="")
118 )
119 ]
120 ))
121
122
123 ## CUNIT SCHEDULERS
124 #
125 #c['schedulers'].append(schedulers.ForceScheduler(
126 # name="force_cunit"
127 # ,buttonName="force"
128 # ,builderNames=["cunit"]
129 # ,codebases=[
130 # util.CodebaseParameter(
131 # "",
132 # name="svn",
133 # # will generate a combo box
134 # branch=util.ChoiceStringParameter(
135 # name="branch"
136 # ,choices=["trunk"]+["branches/%s"%i for i in ["mingw64"]]
137 # ,default="branches/ming64"
138 # ),
139 # # following are hidden, but needed for the scheduling system
140 # revision=util.FixedParameter(name="revision", default=""),
141 # repository=util.FixedParameter(name="repository", default=""),
142 # project=util.FixedParameter(name="project", default=""),
143 # )]
144 #))
145
146 ####### BUILDERS
147
148 # The 'builders' list defines the Builders, which tell Buildbot how to perform a build:
149 # what steps, and which workers can execute them. Note that any particular build will
150 # only take place on one worker.
151
152 c['builders'] = []
153
154 ascendsvnstep = steps.SVN(repourl=ASCEND_SVN_INTERP ,mode="incremental" ,haltOnFailure=True)
155 ascendcleanstep = steps.ShellCommand(name="clean",command=['/usr/bin/scons','-c'],haltOnFailure=True)
156 ascendteststep = steps.Test(name="test",command=["test/test_expectpass"],env={'LD_LIBRARY_PATH':'.:/usr/local/lib'},haltOnFailure=True)
157
158 # ASCEND CUNIT TESTS
159
160 ascendfactory = util.BuildFactory()
161 # svn up
162 ascendfactory.addStep(ascendsvnstep)
163 # clean
164 ascendfactory.addStep(ascendcleanstep)
165 # build
166 ascendfactory.addStep(steps.Compile(name="build"
167 ,command=["/usr/bin/scons","WITH_DOC_BUILD=0","MALLOC_DEBUG=1"
168 ,"ascend","models","solvers","test"
169 ],haltOnFailure=True
170 # ,warningPattern="^(.\*?):([0-9]+): [Ww]arning: (.\*)$"
171 # ,warningExtractor=steps.Compile.warnExtractFromRegexpGroups
172 ))
173 # test
174 ascendfactory.addStep(ascendteststep)
175
176 c['builders'].append(util.BuilderConfig(
177 name="ascend", workernames=WORKERS
178 ,factory=ascendfactory
179 ))
180
181 # ASCEND LCOV COVERAGE
182
183 covfactory = util.BuildFactory()
184
185 LCOV = "/usr/local/bin/lcov"
186 GENHTML = "/usr/local/bin/genhtml"
187
188 from buildbot.steps.transfer import DirectoryUpload
189
190 covfactory.addSteps([
191 ascendsvnstep
192 ,ascendcleanstep
193 ,steps.Compile(name="build"
194 ,command=["/usr/bin/scons","WITH_DOC_BUILD=0","MALLOC_DEBUG=1","GCOV=1","test","ascend","models","solvers"]
195 ,haltOnFailure=True)
196 ,steps.ShellCommand(name="zero",command=[LCOV,"-z","-d","."],haltOnFailure=True)
197 ,ascendteststep
198 ,steps.ShellCommand(name="lcov"
199 ,command=[LCOV,"-c","-d",".","-o","test/lcov1.info","-t","\"ASCEND CUnit Tests\"","--no-external","--exclude","*<stdout>"]
200 ,haltOnFailure=True)
201 ,steps.ShellCommand(name="genhtml"
202 ,command=[GENHTML,"-o","lcov-html","test/lcov1.info","--ignore-errors","source","--prefix",util.Property('builddir')]
203 ,haltOnFailure=True)
204 ,steps.ShellCommand(name="chmod",command=["/bin/chmod","a+rX","lcov-html","-R"],haltOnFailure=True)
205 ,DirectoryUpload(name="upload"
206 ,workersrc="lcov-html"
207 ,masterdest=util.Interpolate("~/lcov-upload/%(prop:buildername)s-%(prop:buildnumber)s")
208 ,url=util.Interpolate("lcov/%(prop:buildername)s-%(prop:buildnumber)s/")
209 # ,compress='gz'
210 )
211 ,steps.MasterShellCommand(name="latest",command=["/bin/ln","-fsT","~/lcov-upload/%(prop:buildername)s-%(prop:buildnumber)s","~/lcov-upload/%(prop:buildername)s-latest"])
212 ])
213
214 c['builders'].append(util.BuilderConfig(
215 name="ascend-lcov", workernames=WORKERS
216 ,factory=covfactory
217 ))
218
219 #------------------------------------------------------------------------------
220 ####### BUILDBOT SERVICES
221 #------------------------------------------------------------------------------
222 # 'services' is a list of BuildbotService items like reporter targets. The
223 # status of each build will be pushed to these targets. buildbot/reporters/*.py
224 # has a variety to choose from, like IRC bots.
225
226 c['services'] = []
227
228 #------------------------------------------------------------------------------
229 ####### PROJECT IDENTITY
230
231 # the 'title' string will appear at the top of this buildbot installation's
232 # home pages (linked to the 'titleURL').
233
234 c['title'] = "ASCEND"
235 c['titleURL'] = "http://xascend4.org/Buildbot"
236
237 # the 'buildbotURL' string should point to the location where the buildbot's
238 # internal web server is visible. This typically uses the port number set in
239 # the 'www' entry below, but with an externally-visible host name which the
240 # buildbot cannot figure out without some help.
241
242 c['buildbotURL'] = "https://build.ascend4.org/"
243 #c['buildbotURL'] = "http://localhost:8020/"
244
245 # minimalistic config to activate new web UI
246 c['www'] = {
247 'port':8020
248 ,'plugins': {
249 'waterfall_view': True
250 # ,'console_view': True
251 # ,'grid_view': True
252 }
253 ,'allowed_origins':['*']
254 # ,'auth': util.HTPasswdAuth("/srv/ascend/apache2/svn.htpasswd")
255 }
256
257 #------------------------------------------------------------------------------
258 ####### DB URL
259
260 c['db'] = {
261 # This specifies what database buildbot uses to store its state. You can leave
262 # this at its default for all but the largest installations.
263 'db_url' : "sqlite:///state.sqlite",
264 }
265
266 #------------------------------------------------------------------------------
267 ####### VALIDATION
268
269 import re
270 c['validation'] = {
271 'branch' : re.compile(r'^[A-Za-z0-9][\w.+/~-]+$'),
272 'revision' : re.compile(r'[1-9][0-9]+$'),
273 'property_name' : re.compile(r'^[\w\.\-\/\~:]*$'),
274 'property_value' : re.compile(r'^[\w\.\-\/\~:]*$'),
275 }
276
277
278

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22