Galina Kistanova | fc176e7 | 2012-09-13 23:51:08 +0000 | [diff] [blame] | 1 | =================================================================== |
| 2 | How To Add Your Build Configuration To LLVM Buildbot Infrastructure |
| 3 | =================================================================== |
| 4 | |
Galina Kistanova | fc176e7 | 2012-09-13 23:51:08 +0000 | [diff] [blame] | 5 | Introduction |
| 6 | ============ |
| 7 | |
| 8 | This document contains information about adding a build configuration and |
Dylan McKay | 985edb6 | 2017-02-05 21:21:23 +0000 | [diff] [blame] | 9 | buildslave to private slave builder to LLVM Buildbot Infrastructure. |
Galina Kistanova | fc176e7 | 2012-09-13 23:51:08 +0000 | [diff] [blame] | 10 | |
Dylan McKay | 985edb6 | 2017-02-05 21:21:23 +0000 | [diff] [blame] | 11 | Buildmasters |
| 12 | ============ |
| 13 | |
| 14 | There are two buildmasters running. |
| 15 | |
| 16 | * The main buildmaster at `<http://lab.llvm.org:8011>`_. All builders attached |
| 17 | to this machine will notify commit authors every time they break the build. |
| 18 | * The staging buildbot at `<http://lab.llvm.org:8014>`_. All builders attached |
| 19 | to this machine will be completely silent by default when the build is broken. |
| 20 | Builders for experimental backends should generally be attached to this |
| 21 | buildmaster. |
Galina Kistanova | fc176e7 | 2012-09-13 23:51:08 +0000 | [diff] [blame] | 22 | |
| 23 | Steps To Add Builder To LLVM Buildbot |
| 24 | ===================================== |
| 25 | Volunteers can provide their build machines to work as build slaves to |
| 26 | public LLVM Buildbot. |
| 27 | |
| 28 | Here are the steps you can follow to do so: |
| 29 | |
| 30 | #. Check the existing build configurations to make sure the one you are |
| 31 | interested in is not covered yet or gets built on your computer much |
| 32 | faster than on the existing one. We prefer faster builds so developers |
| 33 | will get feedback sooner after changes get committed. |
| 34 | |
| 35 | #. The computer you will be registering with the LLVM buildbot |
| 36 | infrastructure should have all dependencies installed and you can |
| 37 | actually build your configuration successfully. Please check what degree |
| 38 | of parallelism (-j param) would give the fastest build. You can build |
| 39 | multiple configurations on one computer. |
| 40 | |
| 41 | #. Install buildslave (currently we are using buildbot version 0.8.5). |
| 42 | Depending on the platform, buildslave could be available to download and |
Dylan McKay | 8d438a8 | 2016-09-29 12:51:26 +0000 | [diff] [blame] | 43 | install with your package manager, or you can download it directly from |
Galina Kistanova | fc176e7 | 2012-09-13 23:51:08 +0000 | [diff] [blame] | 44 | `<http://trac.buildbot.net>`_ and install it manually. |
| 45 | |
| 46 | #. Create a designated user account, your buildslave will be running under, |
| 47 | and set appropriate permissions. |
| 48 | |
| 49 | #. Choose the buildslave root directory (all builds will be placed under |
| 50 | it), buildslave access name and password the build master will be using |
| 51 | to authenticate your buildslave. |
| 52 | |
| 53 | #. Create a buildslave in context of that buildslave account. Point it to |
| 54 | the **lab.llvm.org** port **9990** (see `Buildbot documentation, |
| 55 | Creating a slave |
Dylan McKay | adbcf57 | 2016-09-29 13:29:49 +0000 | [diff] [blame] | 56 | <http://docs.buildbot.net/current/tutorial/firstrun.html#creating-a-slave>`_ |
Galina Kistanova | fc176e7 | 2012-09-13 23:51:08 +0000 | [diff] [blame] | 57 | for more details) by running the following command: |
| 58 | |
| 59 | .. code-block:: bash |
| 60 | |
| 61 | $ buildslave create-slave <buildslave-root-directory> \ |
| 62 | lab.llvm.org:9990 \ |
| 63 | <buildslave-access-name> <buildslave-access-password> |
| 64 | |
Galina Kistanova | 4de93bd | 2017-07-05 20:45:44 +0000 | [diff] [blame] | 65 | To point a slave to silent master please use lab.llvm.org:9994 instead |
| 66 | of lab.llvm.org:9990. |
| 67 | |
Galina Kistanova | fc176e7 | 2012-09-13 23:51:08 +0000 | [diff] [blame] | 68 | #. Fill the buildslave description and admin name/e-mail. Here is an |
| 69 | example of the buildslave description:: |
| 70 | |
| 71 | Windows 7 x64 |
| 72 | Core i7 (2.66GHz), 16GB of RAM |
| 73 | |
| 74 | g++.exe (TDM-1 mingw32) 4.4.0 |
| 75 | GNU Binutils 2.19.1 |
| 76 | cmake version 2.8.4 |
| 77 | Microsoft(R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86 |
| 78 | |
| 79 | #. Make sure you can actually start the buildslave successfully. Then set |
| 80 | up your buildslave to start automatically at the start up time. See the |
| 81 | buildbot documentation for help. You may want to restart your computer |
| 82 | to see if it works. |
| 83 | |
| 84 | #. Send a patch which adds your build slave and your builder to zorg. |
| 85 | |
| 86 | * slaves are added to ``buildbot/osuosl/master/config/slaves.py`` |
| 87 | * builders are added to ``buildbot/osuosl/master/config/builders.py`` |
| 88 | |
Nico Weber | 930f974 | 2019-12-06 17:28:02 -0500 | [diff] [blame] | 89 | Please make sure your builder name and its builddir are unique through the |
| 90 | file. |
Galina Kistanova | aa80df0 | 2017-04-24 21:06:29 +0000 | [diff] [blame] | 91 | |
Nico Weber | 930f974 | 2019-12-06 17:28:02 -0500 | [diff] [blame] | 92 | It is possible to whitelist email addresses to unconditionally receive |
| 93 | notifications on build failure; for this you'll need to add an |
| 94 | ``InformativeMailNotifier`` to ``buildbot/osuosl/master/config/status.py``. |
| 95 | This is particularly useful for the staging buildmaster which is silent |
| 96 | otherwise. |
Dylan McKay | 985edb6 | 2017-02-05 21:21:23 +0000 | [diff] [blame] | 97 | |
Galina Kistanova | fc176e7 | 2012-09-13 23:51:08 +0000 | [diff] [blame] | 98 | #. Send the buildslave access name and the access password directly to |
| 99 | `Galina Kistanova <mailto:gkistanova@gmail.com>`_, and wait till she |
| 100 | will let you know that your changes are applied and buildmaster is |
| 101 | reconfigured. |
| 102 | |
| 103 | #. Check the status of your buildslave on the `Waterfall Display |
| 104 | <http://lab.llvm.org:8011/waterfall>`_ to make sure it is connected, and |
| 105 | ``http://lab.llvm.org:8011/buildslaves/<your-buildslave-name>`` to see |
| 106 | if administrator contact and slave information are correct. |
| 107 | |
| 108 | #. Wait for the first build to succeed and enjoy. |