HowToAddABuilder.rst 4.5 KB

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