BuildBot

From Gnash Project Wiki

Jump to: navigation, search

Gnash buildbot is available here: http://www.gnashdev.org:8010/builders

More info about buildbot itself: http://www.buildbot.net

Contents

Wanted platforms / architectures

The following list of architectures / platforms should be tested before a release. It would be nice if there were buildbot slaves available for all of them.

  • Debian Lenny (i386* / amd64**)
  • Debian Squeeze (i386 / amd64** / kfreebsd-i386** / kfreebsd-amd64**)
  • Debian Sid (i386* / amd64** / hurd** / kfreebsd-i386 / kfreebsd-amd64)
  • Ubuntu Lucid (i386** / amd64)
  • Ubuntu Maverick (i386* / amd64)
  • Ubuntu Natty (i386* / amd64)
  • Ubuntu Oneiric (i386* / amd64)
  • Fedora 15 (i686* / x86_64)
  • Fedora Rawhide (i686 / x86_64)
  • OpenBSD (x86 / amd64)
  • arm and mips

The bold ones are present (2011-09-17) [ * chroot ] [ ** NOT 24x7 online so not triggered by git commits ]

These would be nice to have too:

  • other linux distros
  • other *BSDs
  • Windows
  • MacOSX
  • Haiku
  • OS/2
  • Syllable
  • AmigaOS
  • Cross-build to Android or iPhone

Setting up a build slave

Quick instructions about how to setup a slave

  • Join #gnash@freenode or write to gnash-dev@gnu.org and ask for your buildslave name/password pair.

Current buildslave naming convention is <osrelease>-<oskernel>-<arch> eg. squeeze-linux-amd64

  • Install builbot. On Debian-based systems:
# apt-get install buildbot-slave
  • On your system, choose a path (below "bbpath") which can host at least 2GiB
  • Run:
# buildslave create-slave <bbpath> www.gnashdev.org:9989 <buildslavename> <buildslavepassword>
  • Fill out <bbpath>/info/admin and <bbpath>/info/host
  • On Debian-based, uncomment out and set SLAVE_* vars in /etc/default/buildslave:
SLAVE_ENABLED[1]=0                    # 0-enabled, other-disabled
SLAVE_NAME[1]="gnash"                 # short name printed on start/stop
SLAVE_USER[1]="buildbot"              # user to run slave as
SLAVE_BASEDIR[1]="<bbpath>"           # basedir to slave (absolute path)
SLAVE_OPTIONS[1]=""                   # buildbot options 
SLAVE_PREFIXCMD[1]="nice"             # prefix command, i.e. nice, linux32, dchroot
  • It is important that you run the buildbot as an unprivileged user, ideally as an ad-hoc one (tipically 'buildbot').
# sudo -u <buildbot_user> nice -n <niceness> buildbot start <bbpath>

The 'nice -n <niceness>' part is just a way to be nice to yourself, in case gnash build/test takes up all cpu time....

On Debian-based, as previous step describes, buildbot user is "buildbot" and niceness is the default.

Getting all dependencies

It is best if a build slave can build every part of Gnash, including testcases. For this reason it is recommended to look at the 'configure' step output and act upon any WARNING or RECOMMENDED lines. They should give you good hints about what to install and how. The testsuite requires several packages to be installed to run all tests.

On Debian-based:

# apt-get build-dep gnash
# apt-get install git ccache lsb-release devscripts xulrunner-dev
# apt-get install libming-dev libming-util mtasc haxe swfmill dejagnu libspeexdsp-dev # to run testsuite
# apt-get install libboost-program-options-dev libmysqlclient-dev libgtkglext1-dev csound libqt4-opengl-dev libgles2-mesa-dev libgles1-mesa-dev

On Redhat-based:

# yum install yum-utils
# yum-builddep gnash
# yum install git gcc-c++ ccache redhat-lsb xulrunner-devel
# yum install dejagnu speex-devel nc wget # to run testsuite. You should also install libming mtasc haxe swfmill
# yum install boost-devel mysql-devel csound

Using ccache

To speed up the build, install ccache and add this code to the end of <bbpath>/buildbot.tac:

# Activate Compiler cache
import os
PATH = os.environ['PATH']
PATH = "/usr/lib/ccache:" + PATH
CXX = "ccache g++"
CC = "ccache gcc"
CCACHE_DIR = "/var/lib/buildbot/.ccache"
os.environ = { 'PATH': PATH, 'CXX': CXX, 'CC': CC, 'CCACHE_DIR': CCACHE_DIR }

where

 PATH = "<ccache_executable_install_dir>:" + PATH

and

 CCACHE_DIR = "<builduser_homedir>/.ccache"

might be different on other oses or installations.

Dealing with firewall timeouts

If your slave is behind a NAT you may need to increase the keep alive message frequency. You can do this using the -k switch at create-slave time or you'll find a 'keepalive' variable near the top of buildbot.tac on the slave dir

Requesting builds

You can force builds using the IRC interface (gnash_bb on freenode) or the WEB interface.

Web interface requires username/password fields filled out with "builder/builder" and allows you to specify build parameters filling out "Property <n> Name" and "Value" fields.

Property <n> Name           Value           Description]]
 
 Conf1 .. Conf3       <configure options>   Add configure options to configure step.
                                            Multiple options can be added both one per Conf
                                            property up to 3 Conf and more than one per Conf.
                 e.g.   
                 Property 1 Name = Conf1, Value = --disable-testsuite
                 Property 1 Name = Conf2, Value = --enable-media=gst --enable-renderer=agg

     reset                 whatever         Force git reset
     dist                  whatever         Force distcheck build

Tryserver

  • Install buildbot (>= 0.8) on your machine
  • You can request builds in 2 ways:
  • 1. via PB
    • Request tryusername/trypassword on #gnash@freenode
    • Create a ~/.buildbot/options file:
#try_builders = ["squeeze-linux-x86", "lucid-linux-x86_64", "lenny-linux-x86"]
try_connect = 'pb'
try_master = 'gnashdev.org:9990'
try_username = 'tryusername'
try_password = 'trypassword'
try_vc = 'git'
try_branch = 'master'
  • 2. via ssh
    • Request an account ('SSHUSER' below) at gnashdev.org on #gnash@freenode
    • Create a ~/.buildbot/options file:
#try_builders = ["squeeze-linux-x86", "lucid-linux-x86_64", "lenny-linux-x86"]
try_connect = 'ssh'
masterstatus = 'gnashdev.org:9990'
try_host = 'gnashdev.org'
try_username = 'SSHUSER'
try_dir = '/home/buildbot/buildbot/master/gnash/tryserver'
try_vc = 'git'
try_branch = 'master'
  • Run
$ git diff <what_to_diff> |buildbot try --diff=- -p1

or

$ buildbot try

More details at http://buildbot.net/buildbot/docs/current/try.html