Logo AND Algorithmique Numérique Distribuée

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