How to Set Up a Build Slave for Phoenix

ProjectPhoenix is using the very handy Buildbot tool for a "continuous integration" system. This basically means that every time new or updated code is committed to the wxWidgets or Phoenix source repositories the buildbot will trigger a new build of wxWidgets and Phoenix on all of the attached build slaves using that new code. This helps to ensure that a committed change will not cause a build problem on any of the other platforms that the developer may not have tested yet. We also have build slaves set up to make and publish a binary snapshot of Phoenix for Mac and Windows once per day. The documentation is built daily on another build slave.

You can see the current status of our build master and the current build slaves at this web page. (Green is good.) The daily snapshots and documentation can be downloaded from here.

Although we now have good basic coverage of the platforms and versions with our current build slaves, it will always be helpful to have others that test new combinations of OS, compiler, Python version, etc. If you have a computer that is generally idle, or one that can run a virtual machine in the background, and that has the necessary prerequisites, then you too can help out with this system. This page describes those prerequisites and what you need to do to set up a new build slave for ProjectPhoenix.

Prerequisites for Windows

Prerequisites for Other Platforms

Instructions

  1. On Windows use a Cygwin Bash Shell for running these commands. On the other platforms use whatever is the normal terminal window.
  2. Create a new virtualenv that will be used for running the build slave. Run this command in the folder where you would like the build slave to live and do its work. (You can use whatever name you like for the new virtual environment.)
     virtualenv --distribute --unzip-setuptools --no-site-packages VE_NAME
  3. Activate the virtual environment.
     source VE_NAME/bin/activate  # or "source VE_NAME/Scripts/activate" on Windows
  4. Install the buildbot_slave and dependent packages.
     pip install buildbot_slave
  5. On windows you will also need to download the PyWin32 installer and install it in your virtual environment, something like this:

     easy_install pywin32-217.win32-py2.7.exe
  6. Now you'll want to create the build slave itself. The NAME should be something that indicates the platform or wx port being built, followed by a hyphen and the version of Python being used. For example, "win64-py27". We can add more info into the name to indicate different build options if needed.
     buildslave create-slave NAME buildbot.wxpython.org NAME PASSWORD

    Coordinate with Robin to set up the needed configuration on the build master, and to give you the password to be used. On Windows you should execute buildslave.bat

  7. Edit the files in NAME/info and specify your name and email address in admin and a short description of the buildslave in host.

  8. At this point it would probably be a good idea to test that your computer and the buildbot environment has all the things it will need to do a build. With the virtual environment still activated running the following commands should tell you a lot:
     mkdir testbuild
     cd testbuild
     svn co http://svn.wxwidgets.org/svn/wx/wxWidgets/trunk wxWidgets
     svn co http://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk Phoenix
     cd Phoenix
     python build.py dox etg --nodoc sip build
    If that builds successfully then your buildbot slave is ready to be used and you can remove the testbuild folder. If you will be running a slave that will also be used for making binary distributions or the documentation then a little more setup will be needed, coordinate with Robin for what else needs to be done.
  9. Finally, it is time to start the build slave. You'll also want to execute this command when restarting the build slave after a reboot or whatever. (Be sure to activate the virtual environment first.)
     buildslave start NAME   # Or buildslave.bat on Windows

ProjectPhoenix/BuildbotSlave (last edited 2012-06-14 00:26:40 by c-98-246-90-205)

NOTE: To edit pages in this wiki you must be a member of the TrustedEditorsGroup.