We use Buildbot for continuous integration. Buildbot is a continuous integration system designed to automate the build/test cycle. By automatically rebuilding and testing the tree each time something has changed, build problems are pinpointed quickly, before other developers are inconvenienced by the failure. This is especially true for cross-platform projects like Stellarium.
The Stellarium buildbot BuildMaster (kindly hosted by the FSF-France) is the central service that gathers all build results from the various builders, buildslaves in buildbot jargon. It polls our main source code repository for changes and instructs all buildslaves to rebuild.
We need volunteers to host these buildslaves and you can help the Stellarium project and run one too ! Here's how :
Ideally a buildslave is hosted on an always-on machine but this is not a hard requirement. Here's how to set up one :
First your system needs to meet the compile requirements, follow instructions on one of these pages :
- Compilation on Linux and use this to translate for other unixes
- Windows Build Instructions
- Compilation on Mac OS X
Install the Buildbot buildslave software. It might already be available as a package and if this is version 0.8.7 or higher you can use it, otherwise build the buildslave from source following the installation instructions.
Get buildmaster credentials from H__ on irc freenode:#stellarium or mail to the stellarium mailing list and set up the buildslave replacing user and password :
buildslave create-slave buildslave buildbot.stellarium.org:9989 user password
Edit the buildslave/info/admin and buildslave/info/host files. The admin file holds the buildslave maintainer name and email address (that's you :) and the host file has relevant info on your machine, like for instance :
Stellarium buildbot on Linux (KVM x64) Ubuntu 13.04 with Qt 5.1.1 and GCC 4.7.3 and Cmake 126.96.36.199
For the automated tests the buildslave needs access to a canvas. On X-windows based systems this can be taken care of by Xvfb so install that. On unix-like systems (linux, other unixes, mac osx) the buildslave can be started from crontab :
SHELL=/bin/bash QTDIR="/opt/Qt5.1.1" PATH="/opt/Qt5.1.1/5.1.1/gcc_64/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" LD_LIBRARY_PATH="/opt/Qt5.1.1/5.1.1/gcc_64/lib" DISPLAY=":1" @reboot Xvfb :1 -ac -screen 0 1024x768x24+32 >/dev/null 2>&1 & @reboot buildslave start buildslave
And to prevent the slave from getting stuck a daily restart is OK. This part is optional, replace the hour and minute with what you prefer :
14 3 * * * buildslave restart buildslave
Initial starting can be triggered by temporarily adding :
@reboot buildslave start buildslave
When it runs comment-out this line.
On ms-windows systems the canvas and starting is handled differently. We had this running a year ago and need to re-invent it, so help is welcome.