[haiku-development] Re: Haiku build continuous intergration server

  • From: Matt Madia <mattmadia@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Sat, 21 Sep 2013 16:31:21 -0400

On 9/21/13, Alexander von Gluck IV <kallisti5@xxxxxxxxxxx> wrote:
> 2013/9/19 Alexander von Gluck <kallisti5@xxxxxxxxxxx>:
>> I was playing around with Atlassian Bamboo to do automated
>> builds of Haiku.  It turned out to be pretty easy to
>> configure and get running.
>
> A small update here. Things actually went suprisingly well
> with configuring Bamboo.
>
> Here is my process... (thanks to Urias for the idea of
> configuring the buildtools only when needed.. saves lots of
> cpu cycles)

I haven't heard of Bamboo, so I'm not sure of its benefits over Buildbot.

Here's the current structure and logic to our instance of Buildbot.
The main thing to note is that the cross-tools are built to their own
dedicated directory and referenced by any builds that need it.

Rough directory layout:
* haiku
* buildtools
* cross-tools-<arch> (e.g., cross-tools-ppc, cross-tools-x86gcc2,
cross-tools-x86_64, ..,)
* <build configuration> (e.g., debug, quick build, all targets from
scratch, ..,)


On a commit to buildtools (or a non-existant local copy of buildtools),
1. delete all "cross-tools-<arch>"
2. delete all "<build configuration>"
3. build all of the cross-tools to a specific directory, which is
outside all of the actual generated folders.
        e.g., haiku/cross-tools-x86gcc2 vs. haiku/generated/cross-tools (or
haiku/generated/cross-tools_x86)
done.
        
On a commit to haiku,
1. delete the generated objects. (unless of course, this is a "quick"
build that re-uses generated objects.)
2. conditionally build the buildtools for the specified build configuration.
e.g.,
if [ ! -e 'cross-tools/bin/i586-pc-haiku-gcc' ] ; then
        %(linux32:-)s ../haiku/configure %(configure)s --build-cross-tools
../buildtools
fi

%(linux32:-)s and %(configure)s will pull in variables for the
specific build slave.
  %(linux32:-)s : ["linux32"|""]
  %(configure)s : any valid combination of optional configure
arguments; --use-xattr for example.
3. iterate over a list of jam targets, specific to that build configuration.
done.

--mmadia

Other related posts: