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