Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
update ucontext factory to download the archive instead of using svn; use only one...
[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,all_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
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%sM.tar.gz", "got_revision"),
58                                 masterdest=WithProperties("simgrid-3.3-svn-r%sM.tar.gz", "got_revision")))
59
60 archive = "simgrid-3.3-svn-r%(revision:-)sM.tar.gz"
61 # Test tarball factories
62 pthreads_factory_O3= factory.BuildFactory()
63 pthreads_factory_O3.addStep(ShellCommand,name="cleanup",descriptionDone="cleanup",command=["bash","-c","rm -rf * .svn"])
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(ShellCommand,name="cleanup",descriptionDone="cleanup",command=["bash","-c","rm -rf * .svn"])
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 bob_lock = locks.MasterLock("bob_lock")
94 artimon_lock = locks.MasterLock("artimon_lock")
95 fastnet_lock = locks.MasterLock("fastnet_lock")
96
97 # builders
98 c['builders'] = [    
99      {'name':'distBuilder',
100      'slavename':'bob_dist',
101      'builddir':'/var/lib/buildbot/simgrid/dist-worker',
102      'factory':dist_factory},
103      
104      {'name':'linux_amd64_pthreads_O3',
105      'slavename':'bob',
106      'builddir':'/var/lib/buildbot/simgrid/linux_amd64_pthreads/builddir_O3',
107      'factory':pthreads_factory_O3},
108        
109      {'name':'linux_amd64_ucontext_O3',
110      'slavename':'bob',
111      'builddir':'/var/lib/buildbot/simgrid/linux_amd64_ucontext/builddir_O3',
112      'factory':ucontext_factory_O3},
113      
114      {'name':'linux_i386_pthreads_O3',
115      'slavename':'artimon_pthreads',
116      'builddir':'/var/lib/buildbot/simgrid/linux_i386_pthreads/builddir_O3',
117      'factory':pthreads_factory_O3,
118      'locks': [artimon_lock]},
119               
120      {'name':'linux_i386_ucontext_O3',
121      'slavename':'artimon_ucontext',
122      'builddir':'/var/lib/buildbot/simgrid/linux_i386_ucontext/builddir_O3',
123      'factory':ucontext_factory_O3,
124      'locks': [artimon_lock]},
125      
126      
127      
128      {'name':'mac_os_x_pthreads',
129      'slavename':'fastnet_pthreads',
130      'builddir':'/var/buildbot/simgrid/mac_os_x_pthreads/builddir',
131      'factory':pthreads_factory_O3,
132      'locks': [fastnet_lock]},
133        
134      {'name':'mac_os_x_ucontext',
135      'slavename':'fastnet_ucontext',    
136      'factory':ucontext_factory_O3,
137      'builddir':'/var/buildbot/simgrid/mac_os_x_ucontext/builddir',
138      'locks': [fastnet_lock]},
139      
140      
141      
142      {'name':'windows_builder',
143      'slavename':'windows_slave',
144      'builddir':"C:\\buildslave\\projects\\simgrid\\builddir",
145      'factory':windows_factory}
146      ]
147
148
149 ####### CHANGESOURCES
150
151 # Get changes from SVN, by polling every 60 seconds
152 from buildbot.changes.svnpoller import SVNPoller
153 c['change_source'] = SVNPoller("svn://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk", pollinterval=600)
154
155 # Once we have a change, build a tarball
156
157 from buildbot import scheduler
158 maketarball = scheduler.Scheduler(name="maketarball", branch=None, treeStableTimer=60, builderNames=['distBuilder'])
159
160 c['schedulers'] = [maketarball]
161
162
163 # status targets
164
165 c['status'] = []
166
167 # TODO: move to modernity here (but write an index.html for that)
168 #from buildbot.status.html import WebStatus
169 #c['status'].append(WebStatus(8010))
170 from buildbot.status import html
171 c['status'].append( html.Waterfall(http_port=8010) )
172
173 from buildbot.status import words                                       
174 c['status'].append(words.IRC(host="irc.oftc.net", nick="simgrid_buildbot", channels=["#simgrid"]))
175
176 from buildbot.status.mail import MailNotifier
177 mn = MailNotifier(fromaddr="sg-dev@lists.gforge.inria.fr",
178                   sendToInterestedUsers=False, addLogs=True, extraRecipients=['martin.quinson@loria.fr'])
179 c['status'].append(mn)
180
181 ####################################################################################
182 ## Scheduler configuration
183
184 # We use only one scheduling right now, a nightly one, which reruns everything
185
186 # TODO: Define a list of all slaves and use it here and in the definition of c['builders']
187
188 from buildbot.scheduler import Scheduler, Nightly, Periodic
189
190 #nightly_scheduler = Nightly(
191 #       "nightly",    # name
192 #       all_slaves,   # defined in account.py
193 #       hour=[12,24], # schedule time
194 #       minute=15)          
195
196 #hourly = Periodic("hourly_scheduler", all_slaves, 60*60*2) # delay in seconds
197
198 #c['schedulers'] = [nightly_scheduler,hourly]
199 #c['schedulers'] = []
200
201