Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
try to add a 'svn watch' build scheduler
[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 from buildbot.changes.svnpoller import SVNPoller
37 c['change_source'] = SVNPoller("svn://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk", pollinterval=60)
38
39 from buildbot import scheduler
40 maketarball = scheduler.Scheduler(name="maketarball", branch=None, treeStableTimer=60, builderNames=['dist builder'])
41
42 c['schedulers'] = [maketarball]
43
44
45 ####################################################################################
46 # builders declarations
47
48 from extensions import CustomSVN, CustomConfigure, CustomCheck
49 from buildbot.process import factory
50 from buildbot.steps.transfer import FileUpload
51 from buildbot.steps.shell import ShellCommand
52 from buildbot.steps.source import SVN
53
54 # build tarball factory
55 dist_factory = factory.BuildFactory()
56 dist_factory.addStep(CustomSVN, name ="svn update", baseURL='svn://scm.gforge.inria.fr/svn/simgrid/simgrid/', defaultBranch='trunk', mode="update")
57 dist_factory.addStep(ShellCommand,name ="clean oldies",description = "removing old archives", descriptionDone ="clean oldies",
58                      flunkOnFailure=False,command=["bash","-c","rm -rfv simgrid-*-svn-r* *.tar.gz build/*tar.gz"])
59 dist_factory.addStep(ShellCommand,name = "svn revert",description = "reverting the SVN",descriptionDone = "svn revert",
60                      environ={"LC_ALL":"C"}, haltOnFailure = True,command=["svn" ,"revert","-R","."])
61 dist_factory.addStep(ShellCommand,name = "bootstrap",description = "bootstraping",descriptionDone = "bootstrap",
62                      environ={"LC_ALL":"C"}, haltOnFailure = True,command=["./bootstrap"])
63 dist_factory.addStep(ShellCommand,name = "configure", description="configuring",   descriptionDone="configure",
64                      environ={"LC_ALL":"C"}, haltOnFailure = True,command=["./configure", "--enable-maintainer-mode"])
65 #dist_factory.addStep(ShellCommand,name = "make clean",description = "running make clean",descriptionDone = "make clean",
66 #                     environ={"LC_ALL":"C"}, haltOnFailure = True,command=["make", "clean"])
67 dist_factory.addStep(ShellCommand,name = "make -C src", description = "building src",  descriptionDone = "make -C src",
68                      environ={"LC_ALL":"C"}, haltOnFailure = True,command=["make","-j","4","-C","src"])
69 dist_factory.addStep(ShellCommand,name = "make -C tools", description = "building tools",  descriptionDone = "make -C tools",
70                      environ={"LC_ALL":"C"}, haltOnFailure = True,command=["make","-j","4","-C","tools"])
71 dist_factory.addStep(ShellCommand,name = "make dist", description = "building archive",  descriptionDone = "make dist",
72                      environ={"LC_ALL":"C"}, haltOnFailure = True,command=["make","dist"])
73 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"])
74 dist_factory.addStep(FileUpload(name="Upload archive",slavesrc="simgrid-svn-lastest.tar.gz",masterdest="simgrid-svn-lastest.tar.gz",haltOnFailure = True))
75
76 # Test tarball factories
77 pthreads_factory_O3= factory.BuildFactory()
78 pthreads_factory_O3.addStep(CustomSVN, name ="{svn update}", baseURL='svn://scm.gforge.inria.fr/svn/simgrid/simgrid/', defaultBranch='trunk', mode="update")
79 pthreads_factory_O3.addStep(ShellCommand,name = "{svn revert}",description = "running svn revert",descriptionDone = "svn revert",
80                             environ={"LC_ALL":"C"}, haltOnFailure = True,command=["svn" ,"revert","-R","."])
81 pthreads_factory_O3.addStep(ShellCommand,name = "{configure}", description="running configure",   descriptionDone="configure",
82                             environ={"LC_ALL":"C"}, haltOnFailure = True,command=["./configure",  "--with-pthread","--enable-compile-warnings","--enable-compile-optimizations","--enable-botbuild"])
83 pthreads_factory_O3.addStep(ShellCommand,name = "{make clean}",description = "running make clean",descriptionDone = "make clean",
84                             environ={"LC_ALL":"C"}, haltOnFailure = True,command=["make", "clean"])
85 pthreads_factory_O3.addStep(ShellCommand,name = "{make}",      description = "running make",      descriptionDone = "make",
86                             environ={"LC_ALL":"C"}, haltOnFailure = True,command=["make","-j","4"])
87 pthreads_factory_O3.addStep(CustomCheck,name ="{check all}",        description = "running check all", descriptionDone ="check all",
88                             haltOnFailure = True,command=["./checkall"])
89                             
90 ucontext_factory_O3= factory.BuildFactory()
91 ucontext_factory_O3.addStep(CustomSVN, name ="{svn update}",baseURL='svn://scm.gforge.inria.fr/svn/simgrid/simgrid/', defaultBranch='trunk', mode="update")
92 ucontext_factory_O3.addStep(ShellCommand,name = "{svn revert}",description = "running svn revert",descriptionDone = "svn revert",
93                             environ={"LC_ALL":"C"}, haltOnFailure = True,command=["svn" ,"revert","-R","."])
94 ucontext_factory_O3.addStep(CustomConfigure,name ="{configure}",description="running configure",descriptionDone="configure",
95                             environ={"LC_ALL":"C"}, haltOnFailure = True,command=["./configure", "--with-context=ucontext","--enable-compile-warnings","--enable-compile-optimizations","--enable-botbuild"]) # Main difference with pthread_factory
96 ucontext_factory_O3.addStep(ShellCommand,name = "{make}",description = "running make",descriptionDone = "make",
97                             environ={"LC_ALL":"C"}, haltOnFailure = True,command=["make"])
98 ucontext_factory_O3.addStep(CustomCheck,name = "{check all}",description = "running check all",descriptionDone ="check all",
99                             environ={"LC_ALL":"C"}, haltOnFailure = True,command=["./checkall"])
100
101
102 windows_factory= factory.BuildFactory()
103 windows_factory.addStep(SVN, name ="{svn update}",baseURL='svn://scm.gforge.inria.fr/svn/simgrid/simgrid/', defaultBranch='trunk', mode="update")
104 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"])
105 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"])
106
107
108 # One lock per machine since some tests open sockets on fixed ports
109 from buildbot import locks
110 bob_lock = locks.MasterLock("bob_lock")
111 artimon_lock = locks.MasterLock("artimon_lock")
112 fastnet_lock = locks.MasterLock("fastnet_lock")
113
114 # builders
115 c['builders'] = [    
116      {'name':'dist builder',
117      'slavename':'bob_dist_worker',
118      'builddir':'/var/lib/buildbot/simgrid/dist-worker',
119      'factory':dist_factory},
120      
121      {'name':'linux_amd64_pthreads_O3',
122      'slavename':'bob_pthreads',
123      'builddir':'/var/lib/buildbot/simgrid/linux_amd64_pthreads/builddir_O3',
124      'factory':pthreads_factory_O3,
125      'locks': [bob_lock]},
126        
127      {'name':'linux_amd64_ucontext_O3',
128      'slavename':'bob_ucontext',
129      'builddir':'/var/lib/buildbot/simgrid/linux_amd64_ucontext/builddir_O3',
130      'factory':ucontext_factory_O3,
131      'locks': [bob_lock]},
132
133
134      
135      {'name':'linux_i386_pthreads_O3',
136      'slavename':'artimon_pthreads',
137      'builddir':'/var/lib/buildbot/simgrid/linux_i386_pthreads/builddir_O3',
138      'factory':pthreads_factory_O3,
139      'locks': [artimon_lock]},
140               
141      {'name':'linux_i386_ucontext_O3',
142      'slavename':'artimon_ucontext',
143      'builddir':'/var/lib/buildbot/simgrid/linux_i386_ucontext/builddir_O3',
144      'factory':ucontext_factory_O3,
145      'locks': [artimon_lock]},
146      
147      
148      
149      {'name':'mac_os_x_pthreads',
150      'slavename':'fastnet_pthreads',
151      'builddir':'/var/buildbot/simgrid/mac_os_x_pthreads/builddir',
152      'factory':pthreads_factory_O3,
153      'locks': [fastnet_lock]},
154        
155      {'name':'mac_os_x_ucontext',
156      'slavename':'fastnet_ucontext',    
157      'factory':ucontext_factory_O3,
158      'builddir':'/var/buildbot/simgrid/mac_os_x_ucontext/builddir',
159      'locks': [fastnet_lock]},
160      
161      
162      
163      {'name':'windows_builder',
164      'slavename':'windows_slave',
165      'builddir':"C:\\buildslave\\projects\\simgrid\\builddir",
166      'factory':windows_factory}
167      ]
168
169
170 # status targets
171
172 c['status'] = []
173
174 from buildbot.status import html
175 c['status'].append( html.Waterfall(http_port=8010) )
176
177 from buildbot.status import words                                       
178 c['status'].append(words.IRC(host="irc.oftc.net", nick="buildbot", channels=["#simgrid"]))
179
180 from buildbot.status.mail import MailNotifier
181 mn = MailNotifier(fromaddr="SimGrid buildbot <sg-dev@lists.gforge.inria.fr>",
182                   sendToInterestedUsers=False, extraRecipients=['martin.quinson@loria.fr'])
183 c['status'].append(mn)
184
185 ####################################################################################
186 ## Scheduler configuration
187
188 # We use only one scheduling right now, a nightly one, which reruns everything
189
190 # TODO: setup a rebuilder in response to SVN commits
191 # TODO: Define a list of all slaves and use it here and in the definition of c['builders']
192
193 from buildbot.scheduler import Scheduler, Nightly, Periodic
194
195
196 #nightly_scheduler = Nightly(
197 #       "nightly",    # name
198 #       all_slaves,   # defined in account.py
199 #       hour=[12,24], # schedule time
200 #       minute=15)          
201
202 #hourly = Periodic("hourly_scheduler", all_slaves, 60*60*2) # delay in seconds
203
204 #c['schedulers'] = [nightly_scheduler,hourly]
205 c['schedulers'] = []
206
207