Changes between Version 4 and Version 5 of BuildBot


Ignore:
Timestamp:
Feb 15, 2007 11:23:48 AM (9 years ago)
Author:
simonmar
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BuildBot

    v4 v5  
    22
    33The GHC buildbot builds GHC on various platforms in various different ways each night, runs the test suite and performance benchmarks, and mails the results to the `[email protected]` mailing list.  We're always keen to add more build slaves to the setup, especially if you have a platform that doesn't already have a build slave, so if you'd like to join the fun, please let us know at [mailto:[email protected]].  If a platform is represented in the nightly builds, it's more likely we'll be able to identify and fix problems specific to that platform quickly.
    4 
     4       
    55To see the current status of the builds:
    66
     
    1717Finally, if there is anything special that needs to be done for the client (e.g. if gcc is in an unusual place) then you'll need to let the admins know.
    1818
    19 Then you'll need to install buildbot and its dependencies on the machine that will be doing the nightly build; see the [http://buildbot.sourceforge.net/ BuildBot website] for details.  NB. if you're on Windows, you'll need to install BuildBot under Cygwin using the Cygwin Python; there are various problems getting the GHC build to work via BuildBot using the native Win32 Python, so we've given up on that route for now.
     19Then you'll need to install buildbot and its dependencies on the machine that will be doing the nightly         build; see the [http://buildbot.sourceforge.net/ BuildBot website] for details.  NB. if you're on Windows, you'll need to install BuildBot under Cygwin using the Cygwin Python; there are various problems getting the GHC build to work via BuildBot using the native Win32 Python, so we've given up on that route for now.
    2020
    2121Now create and enter the directory you want the buildbot client to work in
     
    3333
    3434You can watch what your slave is doing by looking at the `twistd.log` file in the directory in which you're running your slave.
     35
     36== Automating startup: Unix ==
     37
     38The easiest way to make the client start up automatically is to use `cron`.  Type `crontab -e`, and add this line to your crontab file:
     39
     40{{{
     41@reboot cd /buildbot/ghc && make start
     42}}}
     43
     44Remember to change `/buildbot/ghc` to your buildbot directory.
     45
     46Cron will run the command in a minimal environment: it won't execute your normal shell startup files, so you won't have your usual `PATH` settings, for example.  To get the right `PATH` and other environment variables, we suggest adding them to the `make start` rule in the `Makefile`.  FOr example, my setup looks something like this:
     47
     48{{{
     49start:
     50        PATH=/usr/bin:/bin:/home/simonmar/bin \
     51        http_proxy=http://157.58.63.38:80 \
     52        twistd --no_save -y buildbot.tac
     53}}}
     54
     55It might be a good idea to have the buildbot restarted once a day before your build is due to start, just in case it has died for any reason.  I have another line in my crontab that looks like this:
     56
     57{{{
     580 17 * * * cd /64playpen/buildbot && (make stop; make start)
     59}}}
     60
     61To restart the client at 17.00, before the builds start at 18.00.
     62
     63It's a good idea to test that running the client via a cron job actually works, so test it: setup a temporary cron job to start the client in a couple of minutes time, check that the client is up and running, and maybe force a build via the status page to check that the build environment is working.
     64
     65== Automating startup: Windows ==
     66
     67I did it the following way.  Create a script in `<buildbotdir>/restart.sh`:
     68
     69{{{
     70PATH=/bin:/usr/bin
     71cd <buildbotdir>
     72make stop
     73make start
     74}}}
     75
     76(don't forget to create the script as a Unix text file, not a DOS text file, otherwise strange things will probably happen, they did to me anyway).
     77
     78Create a new "Scheduled Task" via Control Panel->Scheduled Tasks.  The command you want to run is
     79
     80{{{
     81c:\cygwin\bin\sh <buildbotdir>/restart.sh
     82}}}
     83
     84Schedule the task to run (a) at startup and possibly also (b) once a day, before your build is due to start.  You can add multiple schedulers for a task by checking the box at the bottom of the "Schedule" page of the scheduled task settings.
    3585
    3686== Admin steps ==