2 # ex: set syntax=python:
4 ###################################################################################
5 # This is the file configuration of the buildmaster used in the Simgrid project.
7 #from os import environ
8 #environ['LC_ALL'] = "C"
10 # The buildmaster configuration object.
12 c = BuildmasterConfig = {}
14 # Project informations
16 c['projectName'] = "SimGrid compilation status"
17 c['projectURL']= "http://simgrid.gforge.inria.fr/"
18 c['buildbotURL'] = "http://bob.loria.fr:8010/"
20 # Gets bot from account module (hide passphrases)
21 from account import bots
23 from account import all_slaves
26 # Port number used by slaves
27 c['slavePortnum'] = 9989
32 # the 'sources' list tells the buildmaster how it should find out about
33 # source code changes. Any class which implements IChangeSource can be added
34 # to this list: there are several in buildbot/changes/*.py to choose from.
38 # For example, if you had CVSToys installed on your repository, and your
39 # CVSROOT/freshcfg file had an entry like this:
40 #pb = ConfigurationSet([
41 # (None, None, None, PBService(userpass=('foo', 'bar'), port=4519)),
44 # then you could use the following buildmaster Change Source to subscribe to
45 # the FreshCVS daemon and be notified on every commit:
47 #from buildbot.changes.freshcvs import FreshCVSSource
48 #fc_source = FreshCVSSource("cvs.example.com", 4519, "foo", "bar")
49 #c['sources'].append(fc_source)
51 # or, use a PBChangeSource, and then have your repository's commit script run
52 # 'buildbot sendchange', or contrib/svn_buildbot.py, or
53 # contrib/arch_buildbot.py :
55 #from buildbot.changes.pb import PBChangeSource
56 #c['sources'].append(PBChangeSource())
60 ####################################################################################
61 # builders declarations
63 from extensions import CustomSVN, CustomConfigure, CustomCheck
64 from buildbot.process import step, factory
65 from buildbot.process.step import ShellCommand
68 dist_factory = factory.BuildFactory()
69 dist_factory.addStep(CustomSVN, name ="svn update", baseURL='svn://scm.gforge.inria.fr/svn/simgrid/simgrid/', defaultBranch='trunk', mode="update")
70 dist_factory.addStep(step.ShellCommand,name ="clean oldies",description = "removing old archives", descriptionDone ="clean oldies",
71 flunkOnFailure=False,command=["bash","-c","rm -rfv simgrid-*-svn-r*"])
72 dist_factory.addStep(step.ShellCommand,name = "svn revert",description = "reverting the SVN",descriptionDone = "svn revert",
73 environ={"LC_ALL":"C"}, haltOnFailure = True,command=["svn" ,"revert","-R","."])
74 dist_factory.addStep(step.ShellCommand,name = "bootstrap",description = "bootstraping",descriptionDone = "bootstrap",
75 environ={"LC_ALL":"C"}, haltOnFailure = True,command=["./bootstrap"])
76 dist_factory.addStep(step.ShellCommand,name = "configure", description="configuring", descriptionDone="configure",
77 environ={"LC_ALL":"C"}, haltOnFailure = True,command=["./configure", "--enable-maintainer-mode"])
78 dist_factory.addStep(step.ShellCommand,name = "make clean",description = "running make clean",descriptionDone = "make clean",
79 environ={"LC_ALL":"C"}, haltOnFailure = True,command=["make", "clean"])
80 dist_factory.addStep(step.ShellCommand,name = "make ", description = "building everything", descriptionDone = "make",
81 environ={"LC_ALL":"C"}, haltOnFailure = True,command=["make","-j","4"])
82 dist_factory.addStep(step.ShellCommand,name = "make dist", description = "building archive", descriptionDone = "make dist",
83 environ={"LC_ALL":"C"}, haltOnFailure = True,command=["make","dist"])
86 pthreads_factory_O3= factory.BuildFactory()
87 pthreads_factory_O3.addStep(CustomSVN, name ="{svn update}", baseURL='svn://scm.gforge.inria.fr/svn/simgrid/simgrid/', defaultBranch='trunk', mode="update")
88 pthreads_factory_O3.addStep(step.ShellCommand,name = "{svn revert}",description = "running svn revert",descriptionDone = "svn revert",
89 environ={"LC_ALL":"C"}, haltOnFailure = True,command=["svn" ,"revert","-R","."])
90 pthreads_factory_O3.addStep(step.ShellCommand,name = "{configure}", description="running configure", descriptionDone="configure",
91 environ={"LC_ALL":"C"}, haltOnFailure = True,command=["./configure", "--with-pthread","--enable-compile-warnings","--enable-compile-optimizations","--enable-botbuild"])
92 pthreads_factory_O3.addStep(step.ShellCommand,name = "{make clean}",description = "running make clean",descriptionDone = "make clean",
93 environ={"LC_ALL":"C"}, haltOnFailure = True,command=["make", "clean"])
94 pthreads_factory_O3.addStep(step.ShellCommand,name = "{make}", description = "running make", descriptionDone = "make",
95 environ={"LC_ALL":"C"}, haltOnFailure = True,command=["make","-j","4"])
96 pthreads_factory_O3.addStep(CustomCheck,name ="{check all}", description = "running check all", descriptionDone ="check all",
97 haltOnFailure = True,command=["./checkall"])
99 ucontext_factory_O3= factory.BuildFactory()
100 ucontext_factory_O3.addStep(CustomSVN, name ="{svn update}",baseURL='svn://scm.gforge.inria.fr/svn/simgrid/simgrid/', defaultBranch='trunk', mode="update")
101 ucontext_factory_O3.addStep(step.ShellCommand,name = "{svn revert}",description = "running svn revert",descriptionDone = "svn revert",
102 environ={"LC_ALL":"C"}, haltOnFailure = True,command=["svn" ,"revert","-R","."])
103 ucontext_factory_O3.addStep(CustomConfigure,name ="{configure}",description="running configure",descriptionDone="configure",
104 environ={"LC_ALL":"C"}, haltOnFailure = True,command=["./configure", "--with-context=ucontext","--enable-compile-warnings","--enable-compile-optimizations","--enable-botbuild"]) # Main difference with pthread_factory
105 ucontext_factory_O3.addStep(step.ShellCommand,name = "{make}",description = "running make",descriptionDone = "make",
106 environ={"LC_ALL":"C"}, haltOnFailure = True,command=["make"])
107 ucontext_factory_O3.addStep(CustomCheck,name = "{check all}",description = "running check all",descriptionDone ="check all",
108 environ={"LC_ALL":"C"}, haltOnFailure = True,command=["./checkall"])
111 windows_factory= factory.BuildFactory()
112 windows_factory.addStep(step.SVN, name ="{svn update}",baseURL='svn://scm.gforge.inria.fr/svn/simgrid/simgrid/', defaultBranch='trunk', mode="update")
113 windows_factory.addStep(step.ShellCommand,name = "{make}",description = "running make",descriptionDone = "make",haltOnFailure = True,command=["C:\\buildslave\\projects\\simgrid\\builddir\\buildMake", "C:\\buildslave\\projects\\simgrid\\builddir\\make_all.tst"])
114 windows_factory.addStep(step.ShellCommand,name = "{test suite}",description= "running test suite",descriptionDone ="test suite",haltOnFailure = True,command=["C:\\buildslave\\projects\\simgrid\\builddir\\Test", "C:\\buildslave\\projects\\simgrid\\builddir\\test_all.tst"])
117 # One lock per machine since some tests open sockets on fixed ports
118 from buildbot import locks
119 bob_lock = locks.MasterLock("bob_lock")
120 artimon_lock = locks.MasterLock("artimon_lock")
121 fastnet_lock = locks.MasterLock("fastnet_lock")
125 {'name':'dist builder',
126 'slavename':'bob_dist_worker',
127 'builddir':'/var/lib/buildbot/simgrid/dist-worker',
128 'factory':dist_factory},
130 {'name':'linux_amd64_pthreads_O3',
131 'slavename':'bob_pthreads',
132 'builddir':'/var/lib/buildbot/simgrid/linux_amd64_pthreads/builddir_O3',
133 'factory':pthreads_factory_O3,
134 'locks': [bob_lock]},
136 {'name':'linux_amd64_ucontext_O3',
137 'slavename':'bob_ucontext',
138 'builddir':'/var/lib/buildbot/simgrid/linux_amd64_ucontext/builddir_O3',
139 'factory':ucontext_factory_O3,
140 'locks': [bob_lock]},
144 {'name':'linux_i386_pthreads_O3',
145 'slavename':'artimon_pthreads',
146 'builddir':'/var/lib/buildbot/simgrid/linux_i386_pthreads/builddir_O3',
147 'factory':pthreads_factory_O3,
148 'locks': [artimon_lock]},
150 {'name':'linux_i386_ucontext_O3',
151 'slavename':'artimon_ucontext',
152 'builddir':'/var/lib/buildbot/simgrid/linux_i386_ucontext/builddir_O3',
153 'factory':ucontext_factory_O3,
154 'locks': [artimon_lock]},
158 {'name':'mac_os_x_pthreads',
159 'slavename':'fastnet_pthreads',
160 'builddir':'/var/buildbot/simgrid/mac_os_x_pthreads/builddir',
161 'factory':pthreads_factory_O3,
162 'locks': [fastnet_lock]},
164 {'name':'mac_os_x_ucontext',
165 'slavename':'fastnet_ucontext',
166 'factory':ucontext_factory_O3,
167 'builddir':'/var/buildbot/simgrid/mac_os_x_ucontext/builddir',
168 'locks': [fastnet_lock]},
172 {'name':'windows_builder',
173 'slavename':'windows_slave',
174 'builddir':"C:\\buildslave\\projects\\simgrid\\builddir",
175 'factory':windows_factory}
183 from buildbot.status import html
184 w = html.Waterfall(http_port=8010)
186 c['status'].append(w)
188 # status smtp request
190 from buildbot.status import mail
192 c['status'].append(mail.MailNotifier(builders=['mac_os_x_pthreads'],
193 fromaddr="bob@loria.fr",relayhost="smtp.loria.fr",mode="failing",
194 subject = "Error occured during pthread build of SimGrid on fastnet",
195 extraRecipients=["malek.cherier@loria.fr","martin.quinson@loria.fr"],
196 sendToInterestedUsers=True))
198 c['status'].append(mail.MailNotifier(builders=['mac_os_x_ucontext'],
199 fromaddr="bob@loria.fr",relayhost="smtp.loria.fr",mode="failing",
200 subject = "Error occured during ucontext build of SimGrid on fastnet",
201 extraRecipients=["malek.cherier@loria.fr", "martin.quinson@loria.fr"],
202 sendToInterestedUsers=True))
205 c['status'].append(mail.MailNotifier(builders=['linux_amd64_pthreads'],
206 fromaddr="bob@loria.fr",relayhost="smtp.loria.fr",mode="failing",
207 subject = "Error occured during pthread build of SimGrid on bob",
208 extraRecipients=["malek.cherier@loria.fr", "martin.quinson@loria.fr"],
209 sendToInterestedUsers=True))
211 c['status'].append(mail.MailNotifier(builders=['linux_amd64_pthreads_O0'],
212 fromaddr="bob@loria.fr",relayhost="smtp.loria.fr",mode="failing",
213 subject = "Error occured during pthread build of SimGrid on bob (compiler optimizations O0 enabled)",
214 extraRecipients=["malek.cherier@loria.fr", "martin.quinson@loria.fr"],
215 sendToInterestedUsers=True))
217 c['status'].append(mail.MailNotifier(builders=['linux_amd64_pthreads_O3'],
218 fromaddr="bob@loria.fr",relayhost="smtp.loria.fr",mode="failing",
219 subject = "Error occured during pthread build of SimGrid on bob (compiler optimizations O3 enabled)",
220 extraRecipients=["malek.cherier@loria.fr", "martin.quinson@loria.fr"],
221 sendToInterestedUsers=True))
223 c['status'].append(mail.MailNotifier(builders=['linux_amd64_ucontext'],
224 fromaddr="bob@loria.fr",relayhost="smtp.loria.fr",mode="failing",
225 subject = "Error occured during ucontext build of SimGrid on bob",
226 extraRecipients=["malek.cherier@loria.fr", "martin.quinson@loria.fr"],
227 sendToInterestedUsers=True))
229 c['status'].append(mail.MailNotifier(builders=['linux_amd64_ucontext_O0'],
230 fromaddr="bob@loria.fr",relayhost="smtp.loria.fr",mode="failing (compiler optimizations O0 enabled)",
231 subject = "Error occured during ucontext build of SimGrid on bob",
232 extraRecipients=["malek.cherier@loria.fr", "martin.quinson@loria.fr"],
233 sendToInterestedUsers=True))
235 c['status'].append(mail.MailNotifier(builders=['linux_amd64_ucontext_O3'],
236 fromaddr="bob@loria.fr",relayhost="smtp.loria.fr",mode="failing",
237 subject = "Error occured during ucontext build of SimGrid on bob (compiler optimizations O3 enabled)",
238 extraRecipients=["malek.cherier@loria.fr", "martin.quinson@loria.fr"],
239 sendToInterestedUsers=True))
241 c['status'].append(mail.MailNotifier(builders=['windows_builder'],
242 fromaddr="bob@loria.fr",relayhost="smtp.loria.fr",mode="failing",
243 subject = "An error occurs during the build of SimGRID on Windows platform",
244 extraRecipients=["malek.cherier@loria.fr", "martin.quinson@loria.fr"],
245 sendToInterestedUsers=True))
247 c['status'].append(mail.MailNotifier(builders=['linux_i386_pthreads'],
248 fromaddr="bob@loria.fr",relayhost="smtp.loria.fr",mode="failing",
249 subject = "An error occurs during the build of SimGRID on artimon platform",
250 extraRecipients=["malek.cherier@loria.fr", "martin.quinson@loria.fr"],
251 sendToInterestedUsers=True))
254 c['status'].append(mail.MailNotifier(builders=['linux_i386_pthreads_O0'],
255 fromaddr="bob@loria.fr",relayhost="smtp.loria.fr",mode="failing",
256 subject = "An error occurs during the build of SimGRID on artimon platform (compiler optimizations O0 enabled)" ,
257 extraRecipients=["malek.cherier@loria.fr", "martin.quinson@loria.fr"],
258 sendToInterestedUsers=True))
260 c['status'].append(mail.MailNotifier(builders=['linux_i386_pthreads_O3'],
261 fromaddr="bob@loria.fr",relayhost="smtp.loria.fr",mode="failing",
262 subject = "An error occurs during the build of SimGRID on artimon platform (compiler optimizations O3 enabled)" ,
263 extraRecipients=["malek.cherier@loria.fr", "martin.quinson@loria.fr"],
264 sendToInterestedUsers=True))
267 c['status'].append(mail.MailNotifier(builders=['linux_i386_ucontext'],
268 fromaddr="bob@loria.fr",relayhost="smtp.loria.fr",mode="failing",
269 subject = "An error occurs during the build of SimGRID on artimon platform",
270 extraRecipients=["malek.cherier@loria.fr", "martin.quinson@loria.fr"],
271 sendToInterestedUsers=True))
273 c['status'].append(mail.MailNotifier(builders=['linux_i386_ucontext_O0'],
274 fromaddr="bob@loria.fr",relayhost="smtp.loria.fr",mode="failing",
275 subject = "An error occurs during the build of SimGRID on artimon platform (compiler optimizations O0 enabled)",
276 extraRecipients=["malek.cherier@loria.fr", "martin.quinson@loria.fr"],
277 sendToInterestedUsers=True))
279 c['status'].append(mail.MailNotifier(builders=['linux_i386_ucontext_O3'],
280 fromaddr="bob@loria.fr",relayhost="smtp.loria.fr",mode="failing",
281 subject = "An error occurs during the build of SimGRID on artimon platform (compiler optimizations O3 enabled)",
282 extraRecipients=["malek.cherier@loria.fr", "martin.quinson@loria.fr"],
283 sendToInterestedUsers=True))
285 ####################################################################################
286 ## Scheduler configuration
288 # We use only one scheduling right now, a nightly one, which reruns everything
290 # TODO: setup a rebuilder in response to SVN commits
291 # TODO: Define a list of all slaves and use it here and in the definition of c['builders']
293 from buildbot.scheduler import Scheduler, Nightly, Periodic
296 #nightly_scheduler = Nightly(
298 # all_slaves, # defined in account.py
299 # hour=[12,24], # schedule time
302 #hourly = Periodic("hourly_scheduler", all_slaves, 60*60*2) # delay in seconds
304 #c['schedulers'] = [nightly_scheduler,hourly]