Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
port to lastest builbot; fixup the tarball maker slave
[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 bots
22 c['bots'] = bots
23 from account import all_slaves
24
25
26 # Port number used by slaves
27 c['slavePortnum'] = 9989
28
29
30 ####### CHANGESOURCES
31
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.
35
36 #c['change_sources'] = []
37
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)),
42 #    ])
43
44 # then you could use the following buildmaster Change Source to subscribe to
45 # the FreshCVS daemon and be notified on every commit:
46 #
47 #from buildbot.changes.freshcvs import FreshCVSSource
48 #fc_source = FreshCVSSource("cvs.example.com", 4519, "foo", "bar")
49 #c['sources'].append(fc_source)
50
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 :
54 #
55 #from buildbot.changes.pb import PBChangeSource
56 #c['sources'].append(PBChangeSource())
57
58
59
60 ####################################################################################
61 # builders declarations
62
63 from extensions import CustomSVN, CustomConfigure, CustomCheck
64 from buildbot.process import factory
65 from buildbot.steps.transfer import FileUpload
66 from buildbot.steps.shell import ShellCommand
67 from buildbot.steps.source import SVN
68
69 # build tarball factory
70 dist_factory = factory.BuildFactory()
71 dist_factory.addStep(CustomSVN, name ="svn update", baseURL='svn://scm.gforge.inria.fr/svn/simgrid/simgrid/', defaultBranch='trunk', mode="update")
72 dist_factory.addStep(ShellCommand,name ="clean oldies",description = "removing old archives", descriptionDone ="clean oldies",
73                      flunkOnFailure=False,command=["bash","-c","rm -rfv simgrid-*-svn-r* *.tar.gz build/*tar.gz"])
74 dist_factory.addStep(ShellCommand,name = "svn revert",description = "reverting the SVN",descriptionDone = "svn revert",
75                      environ={"LC_ALL":"C"}, haltOnFailure = True,command=["svn" ,"revert","-R","."])
76 dist_factory.addStep(ShellCommand,name = "bootstrap",description = "bootstraping",descriptionDone = "bootstrap",
77                      environ={"LC_ALL":"C"}, haltOnFailure = True,command=["./bootstrap"])
78 dist_factory.addStep(ShellCommand,name = "configure", description="configuring",   descriptionDone="configure",
79                      environ={"LC_ALL":"C"}, haltOnFailure = True,command=["./configure", "--enable-maintainer-mode"])
80 #dist_factory.addStep(ShellCommand,name = "make clean",description = "running make clean",descriptionDone = "make clean",
81 #                     environ={"LC_ALL":"C"}, haltOnFailure = True,command=["make", "clean"])
82 dist_factory.addStep(ShellCommand,name = "make -C src", description = "building src",  descriptionDone = "make -C src",
83                      environ={"LC_ALL":"C"}, haltOnFailure = True,command=["make","-j","4","-C","src"])
84 dist_factory.addStep(ShellCommand,name = "make -C tools", description = "building tools",  descriptionDone = "make -C tools",
85                      environ={"LC_ALL":"C"}, haltOnFailure = True,command=["make","-j","4","-C","tools"])
86 dist_factory.addStep(ShellCommand,name = "make dist", description = "building archive",  descriptionDone = "make dist",
87                      environ={"LC_ALL":"C"}, haltOnFailure = True,command=["make","dist"])
88 dist_factory.addStep(ShellCommand,name = "Prepare archive",descriptionDone="Prepare archive", haltOnFailure = True,command=["bash","-c","ln -s simgrid-*.tar.gz simgrid-svn-lastest.tar.gz"])
89 dist_factory.addStep(FileUpload(name="Upload archive",slavesrc="simgrid-svn-lastest.tar.gz",masterdest="simgrid-svn-lastest.tar.gz",haltOnFailure = True))
90
91 # Test tarball factories
92 pthreads_factory_O3= factory.BuildFactory()
93 pthreads_factory_O3.addStep(CustomSVN, name ="{svn update}", baseURL='svn://scm.gforge.inria.fr/svn/simgrid/simgrid/', defaultBranch='trunk', mode="update")
94 pthreads_factory_O3.addStep(ShellCommand,name = "{svn revert}",description = "running svn revert",descriptionDone = "svn revert",
95                             environ={"LC_ALL":"C"}, haltOnFailure = True,command=["svn" ,"revert","-R","."])
96 pthreads_factory_O3.addStep(ShellCommand,name = "{configure}", description="running configure",   descriptionDone="configure",
97                             environ={"LC_ALL":"C"}, haltOnFailure = True,command=["./configure",  "--with-pthread","--enable-compile-warnings","--enable-compile-optimizations","--enable-botbuild"])
98 pthreads_factory_O3.addStep(ShellCommand,name = "{make clean}",description = "running make clean",descriptionDone = "make clean",
99                             environ={"LC_ALL":"C"}, haltOnFailure = True,command=["make", "clean"])
100 pthreads_factory_O3.addStep(ShellCommand,name = "{make}",      description = "running make",      descriptionDone = "make",
101                             environ={"LC_ALL":"C"}, haltOnFailure = True,command=["make","-j","4"])
102 pthreads_factory_O3.addStep(CustomCheck,name ="{check all}",        description = "running check all", descriptionDone ="check all",
103                             haltOnFailure = True,command=["./checkall"])
104                             
105 ucontext_factory_O3= factory.BuildFactory()
106 ucontext_factory_O3.addStep(CustomSVN, name ="{svn update}",baseURL='svn://scm.gforge.inria.fr/svn/simgrid/simgrid/', defaultBranch='trunk', mode="update")
107 ucontext_factory_O3.addStep(ShellCommand,name = "{svn revert}",description = "running svn revert",descriptionDone = "svn revert",
108                             environ={"LC_ALL":"C"}, haltOnFailure = True,command=["svn" ,"revert","-R","."])
109 ucontext_factory_O3.addStep(CustomConfigure,name ="{configure}",description="running configure",descriptionDone="configure",
110                             environ={"LC_ALL":"C"}, haltOnFailure = True,command=["./configure", "--with-context=ucontext","--enable-compile-warnings","--enable-compile-optimizations","--enable-botbuild"]) # Main difference with pthread_factory
111 ucontext_factory_O3.addStep(ShellCommand,name = "{make}",description = "running make",descriptionDone = "make",
112                             environ={"LC_ALL":"C"}, haltOnFailure = True,command=["make"])
113 ucontext_factory_O3.addStep(CustomCheck,name = "{check all}",description = "running check all",descriptionDone ="check all",
114                             environ={"LC_ALL":"C"}, haltOnFailure = True,command=["./checkall"])
115
116
117 windows_factory= factory.BuildFactory()
118 windows_factory.addStep(SVN, name ="{svn update}",baseURL='svn://scm.gforge.inria.fr/svn/simgrid/simgrid/', defaultBranch='trunk', mode="update")
119 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"])
120 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"])
121
122
123 # One lock per machine since some tests open sockets on fixed ports
124 from buildbot import locks
125 bob_lock = locks.MasterLock("bob_lock")
126 artimon_lock = locks.MasterLock("artimon_lock")
127 fastnet_lock = locks.MasterLock("fastnet_lock")
128
129 # builders
130 c['builders'] = [    
131      {'name':'dist builder',
132      'slavename':'bob_dist_worker',
133      'builddir':'/var/lib/buildbot/simgrid/dist-worker',
134      'factory':dist_factory},
135      
136      {'name':'linux_amd64_pthreads_O3',
137      'slavename':'bob_pthreads',
138      'builddir':'/var/lib/buildbot/simgrid/linux_amd64_pthreads/builddir_O3',
139      'factory':pthreads_factory_O3,
140      'locks': [bob_lock]},
141        
142      {'name':'linux_amd64_ucontext_O3',
143      'slavename':'bob_ucontext',
144      'builddir':'/var/lib/buildbot/simgrid/linux_amd64_ucontext/builddir_O3',
145      'factory':ucontext_factory_O3,
146      'locks': [bob_lock]},
147
148
149      
150      {'name':'linux_i386_pthreads_O3',
151      'slavename':'artimon_pthreads',
152      'builddir':'/var/lib/buildbot/simgrid/linux_i386_pthreads/builddir_O3',
153      'factory':pthreads_factory_O3,
154      'locks': [artimon_lock]},
155               
156      {'name':'linux_i386_ucontext_O3',
157      'slavename':'artimon_ucontext',
158      'builddir':'/var/lib/buildbot/simgrid/linux_i386_ucontext/builddir_O3',
159      'factory':ucontext_factory_O3,
160      'locks': [artimon_lock]},
161      
162      
163      
164      {'name':'mac_os_x_pthreads',
165      'slavename':'fastnet_pthreads',
166      'builddir':'/var/buildbot/simgrid/mac_os_x_pthreads/builddir',
167      'factory':pthreads_factory_O3,
168      'locks': [fastnet_lock]},
169        
170      {'name':'mac_os_x_ucontext',
171      'slavename':'fastnet_ucontext',    
172      'factory':ucontext_factory_O3,
173      'builddir':'/var/buildbot/simgrid/mac_os_x_ucontext/builddir',
174      'locks': [fastnet_lock]},
175      
176      
177      
178      {'name':'windows_builder',
179      'slavename':'windows_slave',
180      'builddir':"C:\\buildslave\\projects\\simgrid\\builddir",
181      'factory':windows_factory}
182      ]
183
184
185 # status html page
186
187 c['status'] = []
188
189 from buildbot.status import html
190 w = html.Waterfall(http_port=8010)
191
192 c['status'].append(w)
193
194 # status smtp request
195
196 from buildbot.status.mail import MailNotifier
197
198 mn = MailNotifier(fromaddr="SimGrid buildbot <sg-dev@lists.gforge.inria.fr>",
199                   sendToInterestedUsers=False,
200                   extraRecipients=['martin.quinson@loria.fr'])
201 c['status'].append(mn)
202
203 ####################################################################################
204 ## Scheduler configuration
205
206 # We use only one scheduling right now, a nightly one, which reruns everything
207
208 # TODO: setup a rebuilder in response to SVN commits
209 # TODO: Define a list of all slaves and use it here and in the definition of c['builders']
210
211 from buildbot.scheduler import Scheduler, Nightly, Periodic
212
213
214 #nightly_scheduler = Nightly(
215 #       "nightly",    # name
216 #       all_slaves,   # defined in account.py
217 #       hour=[12,24], # schedule time
218 #       minute=15)          
219
220 #hourly = Periodic("hourly_scheduler", all_slaves, 60*60*2) # delay in seconds
221
222 #c['schedulers'] = [nightly_scheduler,hourly]
223 c['schedulers'] = []
224
225