On 8/10/2011 2:45 AM, Ruben Van Boxem wrote:
<snippy snippity snip>

> How does the buildbot work, *exactly*, when I ask it to do a
> mingw-x86-x86_64 build for example (for simplicity, assume I used the
> forcesrc page)? This would really help my understanding of it :)

Since I don't trust myself, let's go look at the source...

First, where the heck is it? It's declared at
http://mingw-w64.svn.sourceforge.net/viewvc/mingw-w64/experimental/buildbot/master.cfg?revision=4306&view=markup#l250

Which eventually ends up calling ForceBuilderBase.build (via getChild):
http://mingw-w64.svn.sourceforge.net/viewvc/mingw-w64/experimental/buildbot/forcebuilder.py?revision=3416&view=markup#l67

(Note that is_nightly there really is "do I want to upload", it was just 
misnamed and never changed.)

Eventually it goes off into buildbot land, calling 
BuilderControl.submitBuildRequest
https://github.com/buildbot/buildbot/blob/v0.8.4p2/master/buildbot/process/builder.py#L863

... Through which is a bunch of buildbot goop I mostly ignore. In the 
middle there (because this is /forcesrc) we fire off the 
NightlySrcPackageFactory builder,
http://mingw-w64.svn.sourceforge.net/viewvc/mingw-w64/experimental/buildbot/factories/nightlysrcpackage.py?revision=4365&view=markup#l23

Note that (see master.cfg above) forcesrc sets a bunch of properties by 
default (that's what the various textboxes do); for example, 'datestamp' 
is '_custom' instead the current date. (You can see this by actually 
making a build; the properties are listed in the source builder's build 
listing.)

The source builder goes off to fill in missing properties, then a `rm 
-rfv` (-v to prevent buildbot timing out; line 55 in 
nightlysrcpackage.py).  It downloads makebuildroot.mk, then runs make 
against it with various targets (pull patches, pull binutils, pull gcc, 
download gmp, extract gmp, download mpfr, extract mpfr, download mpc, 
extract mpc, pull mingw-w64, patch mingw-w64, write the revstamp, make 
the source package). Then it ships the source package over to the build 
master, (I think the publish step internally gets skipped), and finally 
triggers the various builds to get run.  Note that the various patch 
steps aren't being run in the makefile because I didn't want to think 
about applying the right patch to the right branch there.

The builds are over in 
http://mingw-w64.svn.sourceforge.net/viewvc/mingw-w64/experimental/buildbot/factories/mingw64factory.py?revision=4312&view=markup#l16
(Note various platform-specific versions near the bottom; they're named 
TargetHostFactory because it seemed like a good idea at the time. Times 
may have changed.)  That's just more fancy running of the makefile 
again: first grab the makefile, then the source tarball (via 
"src-download" instead of "src-download-web" because it wasn't 
published), extract it, then... well, one target at a time, really.  I 
can't remember why the archive step there isn't using the makefile.... 
But anyway, make a tarball/zip, throw over it to the build master again, 
and trigger an upload if appropriate.

So, basically, buildbot is being used as a fancy way of running the same 
makefile on various machines.  Makes it easier to run the makefile 
locally and (usually) produce the same results.  The various 
intermediate targets in the makefile serves as entry points for 
buildbot, assuming all the previous steps were already done.


HTH,

-- 
Mook


------------------------------------------------------------------------------
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. 
http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to