HowToReleaseLLVM.rst 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385
  1. =================================
  2. How To Release LLVM To The Public
  3. =================================
  4. Introduction
  5. ============
  6. This document contains information about successfully releasing LLVM ---
  7. including sub-projects: e.g., ``clang`` and ``compiler-rt`` --- to the public.
  8. It is the Release Manager's responsibility to ensure that a high quality build
  9. of LLVM is released.
  10. If you're looking for the document on how to test the release candidates and
  11. create the binary packages, please refer to the :doc:`ReleaseProcess` instead.
  12. .. _timeline:
  13. Release Timeline
  14. ================
  15. LLVM is released on a time based schedule --- with major releases roughly
  16. every 6 months. In between major releases there may be dot releases.
  17. The release manager will determine if and when to make a dot release based
  18. on feedback from the community. Typically, dot releases should be made if
  19. there are large number of bug-fixes in the stable branch or a critical bug
  20. has been discovered that affects a large number of users.
  21. Unless otherwise stated, dot releases will follow the same procedure as
  22. major releases.
  23. The release process is roughly as follows:
  24. * Set code freeze and branch creation date for 6 months after last code freeze
  25. date. Announce release schedule to the LLVM community and update the website.
  26. * Create release branch and begin release process.
  27. * Send out release candidate sources for first round of testing. Testing lasts
  28. 7-10 days. During the first round of testing, any regressions found should be
  29. fixed. Patches are merged from mainline into the release branch. Also, all
  30. features need to be completed during this time. Any features not completed at
  31. the end of the first round of testing will be removed or disabled for the
  32. release.
  33. * Generate and send out the second release candidate sources. Only *critical*
  34. bugs found during this testing phase will be fixed. Any bugs introduced by
  35. merged patches will be fixed. If so a third round of testing is needed.
  36. * The release notes are updated.
  37. * Finally, release!
  38. The release process will be accelerated for dot releases. If the first round
  39. of testing finds no critical bugs and no regressions since the last major release,
  40. then additional rounds of testing will not be required.
  41. Release Process
  42. ===============
  43. .. contents::
  44. :local:
  45. Release Administrative Tasks
  46. ----------------------------
  47. This section describes a few administrative tasks that need to be done for the
  48. release process to begin. Specifically, it involves:
  49. * Creating the release branch,
  50. * Setting version numbers, and
  51. * Tagging release candidates for the release team to begin testing.
  52. Create Release Branch
  53. ^^^^^^^^^^^^^^^^^^^^^
  54. Branch the Subversion trunk using the following procedure:
  55. #. Remind developers that the release branching is imminent and to refrain from
  56. committing patches that might break the build. E.g., new features, large
  57. patches for works in progress, an overhaul of the type system, an exciting
  58. new TableGen feature, etc.
  59. #. Verify that the current Subversion trunk is in decent shape by
  60. examining nightly tester and buildbot results.
  61. #. Create the release branch for ``llvm``, ``clang``, and other sub-projects,
  62. from the last known good revision. The branch's name is
  63. ``release_XY``, where ``X`` is the major and ``Y`` the minor release
  64. numbers. Use ``utils/release/tag.sh`` to tag the release.
  65. #. Advise developers that they may now check their patches into the Subversion
  66. tree again.
  67. #. The Release Manager should switch to the release branch, because all changes
  68. to the release will now be done in the branch. The easiest way to do this is
  69. to grab a working copy using the following commands:
  70. ::
  71. $ svn co https://llvm.org/svn/llvm-project/llvm/branches/release_XY llvm-X.Y
  72. $ svn co https://llvm.org/svn/llvm-project/cfe/branches/release_XY clang-X.Y
  73. $ svn co https://llvm.org/svn/llvm-project/test-suite/branches/release_XY test-suite-X.Y
  74. Update LLVM Version
  75. ^^^^^^^^^^^^^^^^^^^
  76. After creating the LLVM release branch, update the release branches'
  77. ``CMakeLists.txt`` versions from '``X.Ysvn``' to '``X.Y``'.
  78. Update it on mainline as well to be the next version ('``X.Y+1svn``').
  79. In addition, the version numbers of all the Bugzilla components must be updated
  80. for the next release.
  81. Tagging the LLVM Release Candidates
  82. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  83. Tag release candidates using the tag.sh script in utils/release.
  84. ::
  85. $ ./tag.sh -release X.Y.Z -rc $RC
  86. The Release Manager may supply pre-packaged source tarballs for users. This can
  87. be done with the export.sh script in utils/release.
  88. ::
  89. $ ./export.sh -release X.Y.Z -rc $RC
  90. This will generate source tarballs for each LLVM project being validated, which
  91. can be uploaded to the website for further testing.
  92. Build Clang Binary Distribution
  93. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  94. Creating the ``clang`` binary distribution requires following the instructions
  95. :doc:`here <ReleaseProcess>`.
  96. That process will perform both Release+Asserts and Release builds but only
  97. pack the Release build for upload. You should use the Release+Asserts sysroot,
  98. normally under ``final/Phase3/Release+Asserts/llvmCore-3.8.1-RCn.install/``,
  99. for test-suite and run-time benchmarks, to make sure nothing serious has
  100. passed through the net. For compile-time benchmarks, use the Release version.
  101. The minimum required version of the tools you'll need are :doc:`here <GettingStarted>`
  102. Release Qualification Criteria
  103. ------------------------------
  104. A release is qualified when it has no regressions from the previous release (or
  105. baseline). Regressions are related to correctness first and performance second.
  106. (We may tolerate some minor performance regressions if they are deemed
  107. necessary for the general quality of the compiler.)
  108. More specifically, Clang/LLVM is qualified when it has a clean test with all
  109. supported sub-projects included (``make check-all``), per target, and it has no
  110. regressions with the ``test-suite`` in relation to the previous release.
  111. Regressions are new failures in the set of tests that are used to qualify
  112. each product and only include things on the list. Every release will have
  113. some bugs in it. It is the reality of developing a complex piece of
  114. software. We need a very concrete and definitive release criteria that
  115. ensures we have monotonically improving quality on some metric. The metric we
  116. use is described below. This doesn't mean that we don't care about other
  117. criteria, but these are the criteria which we found to be most important and
  118. which must be satisfied before a release can go out.
  119. Official Testing
  120. ----------------
  121. A few developers in the community have dedicated time to validate the release
  122. candidates and volunteered to be the official release testers for each
  123. architecture.
  124. These will be the ones testing, generating and uploading the official binaries
  125. to the server, and will be the minimum tests *necessary* for the release to
  126. proceed.
  127. This will obviously not cover all OSs and distributions, so additional community
  128. validation is important. However, if community input is not reached before the
  129. release is out, all bugs reported will have to go on the next stable release.
  130. The official release managers are:
  131. * Major releases (X.0): Hans Wennborg
  132. * Stable releases (X.n): Tom Stellard
  133. The official release testers are volunteered from the community and have
  134. consistently validated and released binaries for their targets/OSs. To contact
  135. them, you should email the ``release-testers@lists.llvm.org`` mailing list.
  136. The official testers list is in the file ``RELEASE_TESTERS.TXT``, in the ``LLVM``
  137. repository.
  138. Community Testing
  139. -----------------
  140. Once all testing has been completed and appropriate bugs filed, the release
  141. candidate tarballs are put on the website and the LLVM community is notified.
  142. We ask that all LLVM developers test the release in any the following ways:
  143. #. Download ``llvm-X.Y``, ``llvm-test-X.Y``, and the appropriate ``clang``
  144. binary. Build LLVM. Run ``make check`` and the full LLVM test suite (``make
  145. TEST=nightly report``).
  146. #. Download ``llvm-X.Y``, ``llvm-test-X.Y``, and the ``clang`` sources. Compile
  147. everything. Run ``make check`` and the full LLVM test suite (``make
  148. TEST=nightly report``).
  149. #. Download ``llvm-X.Y``, ``llvm-test-X.Y``, and the appropriate ``clang``
  150. binary. Build whole programs with it (ex. Chromium, Firefox, Apache) for
  151. your platform.
  152. #. Download ``llvm-X.Y``, ``llvm-test-X.Y``, and the appropriate ``clang``
  153. binary. Build *your* programs with it and check for conformance and
  154. performance regressions.
  155. #. Run the :doc:`release process <ReleaseProcess>`, if your platform is
  156. *different* than that which is officially supported, and report back errors
  157. only if they were not reported by the official release tester for that
  158. architecture.
  159. We also ask that the OS distribution release managers test their packages with
  160. the first candidate of every release, and report any *new* errors in Bugzilla.
  161. If the bug can be reproduced with an unpatched upstream version of the release
  162. candidate (as opposed to the distribution's own build), the priority should be
  163. release blocker.
  164. During the first round of testing, all regressions must be fixed before the
  165. second release candidate is tagged.
  166. In the subsequent stages, the testing is only to ensure that bug
  167. fixes previously merged in have not created new major problems. *This is not
  168. the time to solve additional and unrelated bugs!* If no patches are merged in,
  169. the release is determined to be ready and the release manager may move onto the
  170. next stage.
  171. Reporting Regressions
  172. ---------------------
  173. Every regression that is found during the tests (as per the criteria above),
  174. should be filled in a bug in Bugzilla with the priority *release blocker* and
  175. blocking a specific release.
  176. To help manage all the bugs reported and which ones are blockers or not, a new
  177. "[meta]" bug should be created and all regressions *blocking* that Meta. Once
  178. all blockers are done, the Meta can be closed.
  179. If a bug can't be reproduced, or stops being a blocker, it should be removed
  180. from the Meta and its priority decreased to *normal*. Debugging can continue,
  181. but on trunk.
  182. Merge Requests
  183. --------------
  184. You can use any of the following methods to request that a revision from trunk
  185. be merged into a release branch:
  186. #. Use the ``utils/release/merge-request.sh`` script which will automatically
  187. file a bug_ requesting that the patch be merged. e.g. To request revision
  188. 12345 be merged into the branch for the 5.0.1 release:
  189. ``llvm.src/utils/release/merge-request.sh -stable-version 5.0 -r 12345 -user bugzilla@example.com``
  190. #. Manually file a bug_ with the subject: "Merge r12345 into the X.Y branch",
  191. enter the commit(s) that you want merged in the "Fixed by Commit(s)" and mark
  192. it as a blocker of the current release bug. Release bugs are given aliases
  193. in the form of release-x.y.z, so to mark a bug as a blocker for the 5.0.1
  194. release, just enter release-5.0.1 in the "Blocks" field.
  195. #. Reply to the commit email on llvm-commits for the revision to merge and cc
  196. the release manager.
  197. .. _bug: https://bugs.llvm.org/
  198. Release Patch Rules
  199. -------------------
  200. Below are the rules regarding patching the release branch:
  201. #. Patches applied to the release branch may only be applied by the release
  202. manager, the official release testers or the code owners with approval from
  203. the release manager.
  204. #. During the first round of testing, patches that fix regressions or that are
  205. small and relatively risk free (verified by the appropriate code owner) are
  206. applied to the branch. Code owners are asked to be very conservative in
  207. approving patches for the branch. We reserve the right to reject any patch
  208. that does not fix a regression as previously defined.
  209. #. During the remaining rounds of testing, only patches that fix critical
  210. regressions may be applied.
  211. #. For dot releases all patches must maintain both API and ABI compatibility with
  212. the previous major release. Only bug-fixes will be accepted.
  213. Merging Patches
  214. ^^^^^^^^^^^^^^^
  215. The ``utils/release/merge.sh`` script can be used to merge individual revisions
  216. into any one of the llvm projects. To merge revision ``$N`` into project
  217. ``$PROJ``, do:
  218. #. ``svn co https://llvm.org/svn/llvm-project/$PROJ/branches/release_XX
  219. $PROJ.src``
  220. #. ``$PROJ.src/utils/release/merge.sh --proj $PROJ --rev $N``
  221. #. Run regression tests.
  222. #. ``cd $PROJ.src``. Run the ``svn commit`` command printed out by ``merge.sh``
  223. in step 2.
  224. Release Final Tasks
  225. -------------------
  226. The final stages of the release process involves tagging the "final" release
  227. branch, updating documentation that refers to the release, and updating the
  228. demo page.
  229. Update Documentation
  230. ^^^^^^^^^^^^^^^^^^^^
  231. Review the documentation and ensure that it is up to date. The "Release Notes"
  232. must be updated to reflect new features, bug fixes, new known issues, and
  233. changes in the list of supported platforms. The "Getting Started Guide" should
  234. be updated to reflect the new release version number tag available from
  235. Subversion and changes in basic system requirements. Merge both changes from
  236. mainline into the release branch.
  237. .. _tag:
  238. Tag the LLVM Final Release
  239. ^^^^^^^^^^^^^^^^^^^^^^^^^^
  240. Tag the final release sources using the tag.sh script in utils/release.
  241. ::
  242. $ ./tag.sh -release X.Y.Z -final
  243. Update the LLVM Demo Page
  244. -------------------------
  245. The LLVM demo page must be updated to use the new release. This consists of
  246. using the new ``clang`` binary and building LLVM.
  247. Update the LLVM Website
  248. ^^^^^^^^^^^^^^^^^^^^^^^
  249. The website must be updated before the release announcement is sent out. Here
  250. is what to do:
  251. #. Check out the ``www`` module from Subversion.
  252. #. Create a new sub-directory ``X.Y`` in the releases directory.
  253. #. Commit the ``llvm``, ``test-suite``, ``clang`` source and binaries in this
  254. new directory.
  255. #. Copy and commit the ``llvm/docs`` and ``LICENSE.txt`` files into this new
  256. directory. The docs should be built with ``BUILD_FOR_WEBSITE=1``.
  257. #. Commit the ``index.html`` to the ``release/X.Y`` directory to redirect (use
  258. from previous release).
  259. #. Update the ``releases/download.html`` file with the new release.
  260. #. Update the ``releases/index.html`` with the new release and link to release
  261. documentation.
  262. #. Finally, update the main page (``index.html`` and sidebar) to point to the
  263. new release and release announcement. Make sure this all gets committed back
  264. into Subversion.
  265. Announce the Release
  266. ^^^^^^^^^^^^^^^^^^^^
  267. Send an email to the list announcing the release, pointing people to all the
  268. relevant documentation, download pages and bugs fixed.