Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
I killed so much autogenerated that the svn revision keeps clean after a build on...
[simgrid.git] / build / buildbot / master / master.cfg
1 # -*- python -*-
2 # ex: set syntax=python:
3
4 ###################################################################################
5 # This is the file configuration of the buildmaster used in the Simgrid project.
6
7 #from os import environ
8 #environ['LC_ALL'] = "C"
9
10 # The buildmaster configuration object.
11
12 c = BuildmasterConfig = {}
13
14 # Project informations
15
16 c['projectName'] = "SimGrid compilation status"
17 c['projectURL']= "http://simgrid.gforge.inria.fr/"
18 c['buildbotURL'] = "http://bob.loria.fr:8010/"
19
20 # Gets bot from account module (hide passphrases)
21 from account import slaves
22 c['slaves'] = slaves
23
24 # Port number used by slaves
25 c['slavePortnum'] = 9989
26
27
28
29 ####################################################################################
30 # builders declarations
31
32 from extensions import CustomSVN, CustomConfigure, CustomCheck, CleanupCommand
33 from buildbot.process import factory
34 from buildbot.steps.transfer import FileUpload,FileDownload
35 from buildbot.steps.shell import ShellCommand
36 from buildbot.steps.source import SVN
37 from buildbot.process.properties import WithProperties
38      
39 # build tarball factory
40 dist_factory = factory.BuildFactory()
41 dist_factory.addStep(CustomSVN, name ="svn update", baseURL='svn://scm.gforge.inria.fr/svn/simgrid/simgrid/', defaultBranch='trunk', mode="update")
42 dist_factory.addStep(ShellCommand,name ="clean oldies",description = "removing old archives", descriptionDone ="clean oldies",
43                      flunkOnFailure=False,command=["bash","-c","rm -rfv simgrid-*-svn-r* *.tar.gz build/*tar.gz"])
44 dist_factory.addStep(ShellCommand,name = "svn revert",description = "reverting the SVN",descriptionDone = "svn revert",
45                      environ={"LC_ALL":"C"}, haltOnFailure = True,command=["svn" ,"revert","-R","."])
46 dist_factory.addStep(ShellCommand,name = "bootstrap",description = "bootstraping",descriptionDone = "bootstrap",
47                      environ={"LC_ALL":"C"}, haltOnFailure = True,command=["./bootstrap"])
48 dist_factory.addStep(ShellCommand,name = "configure", description="configuring",   descriptionDone="configure",
49                      environ={"LC_ALL":"C"}, haltOnFailure = True,command=["./configure", "--enable-maintainer-mode"])
50 dist_factory.addStep(ShellCommand,name = "make -C src", description = "building src",  descriptionDone = "make -C src",
51                      environ={"LC_ALL":"C"}, haltOnFailure = True,command=["make","-j","4","-C","src"])
52 dist_factory.addStep(ShellCommand,name = "make -C tools", description = "building tools",  descriptionDone = "make -C tools",
53                      environ={"LC_ALL":"C"}, haltOnFailure = True,command=["make","-j","4","-C","tools"])
54 dist_factory.addStep(ShellCommand,name = "make dist", description = "building archive",  descriptionDone = "make dist",
55                      environ={"LC_ALL":"C"}, haltOnFailure = True,command=["make","dist"])
56 dist_factory.addStep(FileUpload(name="Upload archive",haltOnFailure = True,
57                                 slavesrc= WithProperties("simgrid-3.3-svn-r%s.tar.gz", "got_revision"),
58                                 masterdest=WithProperties("simgrid-3.3-svn-r%s.tar.gz", "got_revision")))
59
60 archive = "simgrid-3.3-svn-r%(revision:-)s.tar.gz"
61 # Test tarball factories
62 pthreads_factory_O3= factory.BuildFactory()
63 pthreads_factory_O3.addStep(CleanupCommand)
64 pthreads_factory_O3.addStep(FileDownload(name="get archive",haltOnFailure=True,slavedest=WithProperties(archive),mastersrc=WithProperties(archive)))
65 pthreads_factory_O3.addStep(ShellCommand, name ="open archive",descriptionDone="open archive", command=["tar","xvfz",WithProperties(archive),"--strip","1"])
66 pthreads_factory_O3.addStep(ShellCommand,name = "configure", description="running configure",   descriptionDone="configure",
67                             environ={"LC_ALL":"C"}, haltOnFailure = True,command=["./configure",  "--with-pthread","--enable-compile-warnings","--enable-compile-optimizations"])
68 pthreads_factory_O3.addStep(ShellCommand,name = "make",      description = "running make",      descriptionDone = "make",
69                             environ={"LC_ALL":"C"}, haltOnFailure = True,command=["make","-j","10"])
70 pthreads_factory_O3.addStep(CustomCheck,name ="check all",        description = "running check all", descriptionDone ="check all",
71                             haltOnFailure = True,command=["./checkall"])
72                             
73 ucontext_factory_O3= factory.BuildFactory()
74 ucontext_factory_O3.addStep(CleanupCommand)
75 ucontext_factory_O3.addStep(FileDownload(name="get archive",haltOnFailure=True,slavedest=WithProperties(archive),mastersrc=WithProperties(archive)))
76 ucontext_factory_O3.addStep(ShellCommand, name ="open archive",descriptionDone="open archive", command=["tar","xvfz",WithProperties(archive),"--strip","1"])
77 ucontext_factory_O3.addStep(CustomConfigure,name ="configure",description="running configure",descriptionDone="configure",
78                             environ={"LC_ALL":"C"}, haltOnFailure = True,command=["./configure", "--with-context=ucontext","--enable-compile-warnings","--enable-compile-optimizations","--enable-botbuild"]) # Main difference with pthread_factory
79 ucontext_factory_O3.addStep(ShellCommand,name = "make",description = "running make",descriptionDone = "make",
80                             environ={"LC_ALL":"C"}, haltOnFailure = True,command=["make","-j","10"])
81 ucontext_factory_O3.addStep(CustomCheck,name = "check all",description = "running check all",descriptionDone ="check all",
82                             environ={"LC_ALL":"C"}, haltOnFailure = True,command=["./checkall"])
83
84
85 windows_factory= factory.BuildFactory()
86 windows_factory.addStep(SVN, name ="{svn update}",baseURL='svn://scm.gforge.inria.fr/svn/simgrid/simgrid/', defaultBranch='trunk', mode="update")
87 windows_factory.addStep(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"])
88 windows_factory.addStep(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"])
89
90
91 # One lock per machine since some tests open sockets on fixed ports
92 from buildbot import locks
93 artimon_lock = locks.MasterLock("artimon_lock")
94 fastnet_lock = locks.MasterLock("fastnet_lock")
95
96 # builders
97 c['builders'] = []    
98 c['builders'].append({'name':'distBuilder',
99                       'slavename':'bob_dist',
100                       'builddir':'/var/lib/buildbot/simgrid/dist-worker',
101                       'factory':dist_factory})
102      
103 c['builders'].append({'name':'linux_amd64_pth',
104                        'slavename':'bob',
105                        'builddir':'/var/lib/buildbot/simgrid/linux_amd64_pthreads/builddir_O3',
106                        'factory':pthreads_factory_O3})
107 c['builders'].append({'name':'linux_amd64_uctx',
108                       'slavename':'bob',
109                       'builddir':'/var/lib/buildbot/simgrid/linux_amd64_ucontext/builddir_O3',
110                       'factory':ucontext_factory_O3})
111
112                       
113 c['builders'].append({'name':'linux_i386_pth',
114                       'slavename':'artimon_pthreads',
115                       'builddir':'/var/lib/buildbot/simgrid/linux_i386_pthreads/builddir_O3',
116                       'factory':pthreads_factory_O3,
117                       'locks': [artimon_lock]})
118 c['builders'].append({'name':'linux_i386_uctx',
119                       'slavename':'artimon_ucontext',
120                       'builddir':'/var/lib/buildbot/simgrid/linux_i386_ucontext/builddir_O3',
121                       'factory':ucontext_factory_O3,
122                       'locks': [artimon_lock]})
123      
124 c['builders'].append({'name':'mac_osx_pth',
125                       'slavename':'fastnet_pthreads',
126                       'builddir':'/var/buildbot/simgrid/mac_os_x_pthreads/builddir',
127                       'factory':pthreads_factory_O3})
128 # Next one not very interesting: it constitently fails (arch not supported yet)                      
129 #c['builders'].append({'name':'mac_os_x_ucontext',
130 #                      'slavename':'fastnet',    
131 #                      'factory':ucontext_factory_O3,
132 #                      'builddir':'/var/buildbot/simgrid/mac_os_x_ucontext/builddir',
133 #                      'locks': [fastnet_lock]})
134      
135 c['builders'].append({'name':'windows_builder',
136                       'slavename':'windows_slave',
137                       'builddir':"C:\\buildslave\\projects\\simgrid\\builddir",
138                       'factory':windows_factory})
139
140
141 test_builders = [b['name'] for b in c['builders']]
142 test_builders.sort()
143 test_builders.remove("distBuilder")
144
145 ####### CHANGESOURCES
146
147 # Get changes from SVN, by polling every 60 seconds
148 from buildbot.changes.svnpoller import SVNPoller
149 c['change_source'] = SVNPoller("svn://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk", pollinterval=600)
150
151 # Once we have a change, build a tarball
152 from buildbot import scheduler
153
154 c['schedulers'] = []
155 c['schedulers'].append( scheduler.Scheduler(name="maketarball", branch=None, treeStableTimer=60, builderNames=['distBuilder']) )
156
157 # and build everything afterward, when the archive is builded
158 c['schedulers'].append( scheduler.Triggerable(name="run tests", builderNames=test_builders) )
159
160 from buildbot.steps import trigger
161 dist_factory.addStep(trigger.Trigger(schedulerNames=['run tests'], waitForFinish=False,
162                                      set_properties={"revision":WithProperties("%(got_revision)s"),
163                                                      "got_revision":WithProperties("%(got_revision)s")}))
164 # status targets
165
166 c['status'] = []
167
168 # TODO: move to modernity here (but write an index.html for that)
169 #from buildbot.status.html import WebStatus
170 #c['status'].append(WebStatus(8010))
171 from buildbot.status import html
172 c['status'].append( html.Waterfall(http_port=8010) )
173
174 from buildbot.status import words                                       
175 c['status'].append(words.IRC(host="irc.oftc.net", nick="simgrid_buildbot", channels=["#simgrid"]))
176
177 from buildbot.status.mail import MailNotifier
178 mn = MailNotifier(fromaddr="sg-dev@lists.gforge.inria.fr",
179                   sendToInterestedUsers=False, addLogs=True, extraRecipients=['martin.quinson@loria.fr'])
180 c['status'].append(mn)
181
182 ####################################################################################
183 ## Scheduler configuration
184
185 # We use only one scheduling right now, a nightly one, which reruns everything
186
187 # TODO: Define a list of all slaves and use it here and in the definition of c['builders']
188
189 from buildbot.scheduler import Scheduler, Nightly, Periodic
190
191 #nightly_scheduler = Nightly(
192 #       "nightly",    # name
193 #       all_slaves,   # defined in account.py
194 #       hour=[12,24], # schedule time
195 #       minute=15)          
196
197 #hourly = Periodic("hourly_scheduler", all_slaves, 60*60*2) # delay in seconds
198
199 #c['schedulers'] = [nightly_scheduler,hourly]
200 #c['schedulers'] = []
201
202