1.. _how_to_add_a_builder:
2
3===================================================================
4How To Add Your Build Configuration To LLVM Buildbot Infrastructure
5===================================================================
6
7.. sectionauthor:: Galina Kistanova <gkistanova@gmail.com>
8
9Introduction
10============
11
12This document contains information about adding a build configuration and
13buildslave to private slave builder to LLVM Buildbot Infrastructure
14`<http://lab.llvm.org:8011>`_.
15
16
17Steps To Add Builder To LLVM Buildbot
18=====================================
19Volunteers can provide their build machines to work as build slaves to
20public LLVM Buildbot.
21
22Here are the steps you can follow to do so:
23
24#. Check the existing build configurations to make sure the one you are
25   interested in is not covered yet or gets built on your computer much
26   faster than on the existing one. We prefer faster builds so developers
27   will get feedback sooner after changes get committed.
28
29#. The computer you will be registering with the LLVM buildbot
30   infrastructure should have all dependencies installed and you can
31   actually build your configuration successfully. Please check what degree
32   of parallelism (-j param) would give the fastest build.  You can build
33   multiple configurations on one computer.
34
35#. Install buildslave (currently we are using buildbot version 0.8.5).
36   Depending on the platform, buildslave could be available to download and
37   install with your packet manager, or you can download it directly from
38   `<http://trac.buildbot.net>`_ and install it manually.
39
40#. Create a designated user account, your buildslave will be running under,
41   and set appropriate permissions.
42
43#. Choose the buildslave root directory (all builds will be placed under
44   it), buildslave access name and password the build master will be using
45   to authenticate your buildslave.
46
47#. Create a buildslave in context of that buildslave account.  Point it to
48   the **lab.llvm.org** port **9990** (see `Buildbot documentation,
49   Creating a slave
50   <http://buildbot.net/buildbot/docs/current/full.html#creating-a-slave>`_
51   for more details) by running the following command:
52
53    .. code-block:: bash
54
55       $ buildslave create-slave <buildslave-root-directory> \
56                    lab.llvm.org:9990 \
57                    <buildslave-access-name> <buildslave-access-password>
58
59#. Fill the buildslave description and admin name/e-mail.  Here is an
60   example of the buildslave description::
61
62       Windows 7 x64
63       Core i7 (2.66GHz), 16GB of RAM
64
65       g++.exe (TDM-1 mingw32) 4.4.0
66       GNU Binutils 2.19.1
67       cmake version 2.8.4
68       Microsoft(R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
69
70#. Make sure you can actually start the buildslave successfully. Then set
71   up your buildslave to start automatically at the start up time.  See the
72   buildbot documentation for help.  You may want to restart your computer
73   to see if it works.
74
75#. Send a patch which adds your build slave and your builder to zorg.
76
77   * slaves are added to ``buildbot/osuosl/master/config/slaves.py``
78   * builders are added to ``buildbot/osuosl/master/config/builders.py``
79
80#. Send the buildslave access name and the access password directly to
81   `Galina Kistanova <mailto:gkistanova@gmail.com>`_, and wait till she
82   will let you know that your changes are applied and buildmaster is
83   reconfigured.
84
85#. Check the status of your buildslave on the `Waterfall Display
86   <http://lab.llvm.org:8011/waterfall>`_ to make sure it is connected, and
87   ``http://lab.llvm.org:8011/buildslaves/<your-buildslave-name>`` to see
88   if administrator contact and slave information are correct.
89
90#. Wait for the first build to succeed and enjoy.
91