blob: b0308a1841946bca6151d0d6637a357a8d7b5ab3 [file] [log] [blame]
Dmitri Gribenko7a936682012-12-07 16:42:48 +00001=================================
2How To Release LLVM To The Public
3=================================
4
Dmitri Gribenko7a936682012-12-07 16:42:48 +00005Introduction
6============
7
8This document contains information about successfully releasing LLVM ---
Renato Golin470172a2016-07-21 12:00:50 +00009including sub-projects: e.g., ``clang`` and ``compiler-rt`` --- to the public.
10It is the Release Manager's responsibility to ensure that a high quality build
11of LLVM is released.
Dmitri Gribenko7a936682012-12-07 16:42:48 +000012
Renato Golinc08f2182013-05-28 10:32:55 +000013If you're looking for the document on how to test the release candidates and
Renato Golin467e2562013-05-28 11:28:37 +000014create the binary packages, please refer to the :doc:`ReleaseProcess` instead.
Renato Golinc08f2182013-05-28 10:32:55 +000015
Dmitri Gribenko7a936682012-12-07 16:42:48 +000016.. _timeline:
17
18Release Timeline
19================
20
Tom Stellard711ce3d2014-02-04 17:18:20 +000021LLVM is released on a time based schedule --- with major releases roughly
22every 6 months. In between major releases there may be dot releases.
23The release manager will determine if and when to make a dot release based
24on feedback from the community. Typically, dot releases should be made if
25there are large number of bug-fixes in the stable branch or a critical bug
26has been discovered that affects a large number of users.
27
28Unless otherwise stated, dot releases will follow the same procedure as
29major releases.
Dmitri Gribenko7a936682012-12-07 16:42:48 +000030
31The release process is roughly as follows:
32
33* Set code freeze and branch creation date for 6 months after last code freeze
34 date. Announce release schedule to the LLVM community and update the website.
35
36* Create release branch and begin release process.
37
38* Send out release candidate sources for first round of testing. Testing lasts
39 7-10 days. During the first round of testing, any regressions found should be
40 fixed. Patches are merged from mainline into the release branch. Also, all
41 features need to be completed during this time. Any features not completed at
42 the end of the first round of testing will be removed or disabled for the
43 release.
44
Renato Golin470172a2016-07-21 12:00:50 +000045* Generate and send out the second release candidate sources. Only *critical*
Dmitri Gribenko7a936682012-12-07 16:42:48 +000046 bugs found during this testing phase will be fixed. Any bugs introduced by
47 merged patches will be fixed. If so a third round of testing is needed.
48
49* The release notes are updated.
50
51* Finally, release!
52
Tom Stellard711ce3d2014-02-04 17:18:20 +000053The release process will be accelerated for dot releases. If the first round
54of testing finds no critical bugs and no regressions since the last major release,
55then additional rounds of testing will not be required.
56
Dmitri Gribenko7a936682012-12-07 16:42:48 +000057Release Process
58===============
59
Dmitri Gribenko0c79cd62012-12-09 15:29:56 +000060.. contents::
61 :local:
Dmitri Gribenko7a936682012-12-07 16:42:48 +000062
63Release Administrative Tasks
64----------------------------
65
66This section describes a few administrative tasks that need to be done for the
67release process to begin. Specifically, it involves:
68
Tom Stellard6f798e42020-10-22 11:33:58 -070069* Updating version numbers,
Dmitri Gribenko7a936682012-12-07 16:42:48 +000070
Tom Stellard6f798e42020-10-22 11:33:58 -070071* Creating the release branch, and
Dmitri Gribenko22470852012-12-09 15:33:26 +000072
Dmitri Gribenko7a936682012-12-07 16:42:48 +000073* Tagging release candidates for the release team to begin testing.
74
Dmitri Gribenko7a936682012-12-07 16:42:48 +000075Create Release Branch
76^^^^^^^^^^^^^^^^^^^^^
77
Tom Stellard6f798e42020-10-22 11:33:58 -070078Branch the Git trunk using the following procedure:
Dmitri Gribenko7a936682012-12-07 16:42:48 +000079
80#. Remind developers that the release branching is imminent and to refrain from
81 committing patches that might break the build. E.g., new features, large
82 patches for works in progress, an overhaul of the type system, an exciting
83 new TableGen feature, etc.
84
Tom Stellard6f798e42020-10-22 11:33:58 -070085#. Verify that the current git trunk is in decent shape by
Dmitri Gribenko7a936682012-12-07 16:42:48 +000086 examining nightly tester and buildbot results.
87
Tom Stellard6f798e42020-10-22 11:33:58 -070088#. Bump the version in trunk to N.0.0git and tag the commit with llvmorg-N-init.
89 If ``X`` is the version to be released, then ``N`` is ``X + 1``.
Dmitri Gribenko7a936682012-12-07 16:42:48 +000090
Tom Stellard6f798e42020-10-22 11:33:58 -070091::
Dmitri Gribenko7a936682012-12-07 16:42:48 +000092
Tom Stellard6f798e42020-10-22 11:33:58 -070093 $ git tag -a llvmorg-N-init
Dmitri Gribenko7a936682012-12-07 16:42:48 +000094
Tom Stellard6f798e42020-10-22 11:33:58 -070095#. Clear the release notes in trunk.
Dmitri Gribenko22470852012-12-09 15:33:26 +000096
Tom Stellard6f798e42020-10-22 11:33:58 -070097#. Create the release branch from the last known good revision from before the
98 version bump. The branch's name is release/X.x where ``X`` is the major version
99 number and ``x`` is just the letter ``x``.
Dmitri Gribenko22470852012-12-09 15:33:26 +0000100
Tom Stellard6f798e42020-10-22 11:33:58 -0700101#. All tags and branches need to be created in both the llvm/llvm-project and
102 llvm/llvm-test-suite repos.
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000103
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000104Update LLVM Version
105^^^^^^^^^^^^^^^^^^^
106
107After creating the LLVM release branch, update the release branches'
Tom Stellard6f798e42020-10-22 11:33:58 -0700108``CMakeLists.txt`` versions from '``X.0.0git``' to '``X.0.0``'.
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000109
110In addition, the version numbers of all the Bugzilla components must be updated
111for the next release.
112
Tom Stellardcb98abe2015-07-31 01:02:35 +0000113Tagging the LLVM Release Candidates
114^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000115
Tom Stellard6f798e42020-10-22 11:33:58 -0700116Tag release candidates:
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000117
118::
119
Tom Stellard6f798e42020-10-22 11:33:58 -0700120 $ git tag -a llvmorg-X.Y.Z-rcN
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000121
122The Release Manager may supply pre-packaged source tarballs for users. This can
Tom Stellardcb98abe2015-07-31 01:02:35 +0000123be done with the export.sh script in utils/release.
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000124
Tom Stellard6f798e42020-10-22 11:33:58 -0700125Tarballs, release binaries, or any other release artifacts must be uploaded to
126GitHub. This can be done using the github-upload-release.py script in utils/release.
127
128::
129
130 $ github-upload-release.py upload --token <github-token> --release X.Y.Z-rcN --files <release_files>
131
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000132::
133
Tom Stellardcb98abe2015-07-31 01:02:35 +0000134 $ ./export.sh -release X.Y.Z -rc $RC
Dmitri Gribenko22470852012-12-09 15:33:26 +0000135
Tom Stellardcb98abe2015-07-31 01:02:35 +0000136This will generate source tarballs for each LLVM project being validated, which
Tom Stellard6f798e42020-10-22 11:33:58 -0700137can be uploaded to github for further testing.
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000138
Tom Stellard6f798e42020-10-22 11:33:58 -0700139Build The Binary Distribution
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000140^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
141
Tom Stellard6f798e42020-10-22 11:33:58 -0700142Creating the binary distribution requires following the instructions
Renato Golin470172a2016-07-21 12:00:50 +0000143:doc:`here <ReleaseProcess>`.
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000144
Renato Golin470172a2016-07-21 12:00:50 +0000145That process will perform both Release+Asserts and Release builds but only
146pack the Release build for upload. You should use the Release+Asserts sysroot,
147normally under ``final/Phase3/Release+Asserts/llvmCore-3.8.1-RCn.install/``,
148for test-suite and run-time benchmarks, to make sure nothing serious has
149passed through the net. For compile-time benchmarks, use the Release version.
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000150
Renato Golin470172a2016-07-21 12:00:50 +0000151The minimum required version of the tools you'll need are :doc:`here <GettingStarted>`
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000152
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000153Release Qualification Criteria
154------------------------------
155
156A release is qualified when it has no regressions from the previous release (or
157baseline). Regressions are related to correctness first and performance second.
158(We may tolerate some minor performance regressions if they are deemed
159necessary for the general quality of the compiler.)
160
Renato Golin470172a2016-07-21 12:00:50 +0000161More specifically, Clang/LLVM is qualified when it has a clean test with all
162supported sub-projects included (``make check-all``), per target, and it has no
163regressions with the ``test-suite`` in relation to the previous release.
164
165Regressions are new failures in the set of tests that are used to qualify
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000166each product and only include things on the list. Every release will have
167some bugs in it. It is the reality of developing a complex piece of
168software. We need a very concrete and definitive release criteria that
169ensures we have monotonically improving quality on some metric. The metric we
170use is described below. This doesn't mean that we don't care about other
171criteria, but these are the criteria which we found to be most important and
Renato Golin470172a2016-07-21 12:00:50 +0000172which must be satisfied before a release can go out.
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000173
Renato Golin470172a2016-07-21 12:00:50 +0000174Official Testing
175----------------
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000176
Renato Golin470172a2016-07-21 12:00:50 +0000177A few developers in the community have dedicated time to validate the release
178candidates and volunteered to be the official release testers for each
179architecture.
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000180
Renato Golin470172a2016-07-21 12:00:50 +0000181These will be the ones testing, generating and uploading the official binaries
182to the server, and will be the minimum tests *necessary* for the release to
183proceed.
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000184
Renato Golin470172a2016-07-21 12:00:50 +0000185This will obviously not cover all OSs and distributions, so additional community
186validation is important. However, if community input is not reached before the
187release is out, all bugs reported will have to go on the next stable release.
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000188
Renato Golin470172a2016-07-21 12:00:50 +0000189The official release managers are:
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000190
Renato Golin470172a2016-07-21 12:00:50 +0000191* Major releases (X.0): Hans Wennborg
192* Stable releases (X.n): Tom Stellard
193
194The official release testers are volunteered from the community and have
195consistently validated and released binaries for their targets/OSs. To contact
196them, you should email the ``release-testers@lists.llvm.org`` mailing list.
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000197
Renato Golin999dd2b2016-07-21 16:46:44 +0000198The official testers list is in the file ``RELEASE_TESTERS.TXT``, in the ``LLVM``
199repository.
200
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000201Community Testing
202-----------------
203
204Once all testing has been completed and appropriate bugs filed, the release
205candidate tarballs are put on the website and the LLVM community is notified.
Renato Golin470172a2016-07-21 12:00:50 +0000206
207We ask that all LLVM developers test the release in any the following ways:
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000208
209#. Download ``llvm-X.Y``, ``llvm-test-X.Y``, and the appropriate ``clang``
210 binary. Build LLVM. Run ``make check`` and the full LLVM test suite (``make
211 TEST=nightly report``).
212
213#. Download ``llvm-X.Y``, ``llvm-test-X.Y``, and the ``clang`` sources. Compile
214 everything. Run ``make check`` and the full LLVM test suite (``make
215 TEST=nightly report``).
216
Renato Golin470172a2016-07-21 12:00:50 +0000217#. Download ``llvm-X.Y``, ``llvm-test-X.Y``, and the appropriate ``clang``
218 binary. Build whole programs with it (ex. Chromium, Firefox, Apache) for
219 your platform.
220
221#. Download ``llvm-X.Y``, ``llvm-test-X.Y``, and the appropriate ``clang``
222 binary. Build *your* programs with it and check for conformance and
223 performance regressions.
224
225#. Run the :doc:`release process <ReleaseProcess>`, if your platform is
226 *different* than that which is officially supported, and report back errors
227 only if they were not reported by the official release tester for that
228 architecture.
229
230We also ask that the OS distribution release managers test their packages with
231the first candidate of every release, and report any *new* errors in Bugzilla.
232If the bug can be reproduced with an unpatched upstream version of the release
233candidate (as opposed to the distribution's own build), the priority should be
234release blocker.
Dmitri Gribenko22470852012-12-09 15:33:26 +0000235
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000236During the first round of testing, all regressions must be fixed before the
237second release candidate is tagged.
Dmitri Gribenko22470852012-12-09 15:33:26 +0000238
Renato Golin470172a2016-07-21 12:00:50 +0000239In the subsequent stages, the testing is only to ensure that bug
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000240fixes previously merged in have not created new major problems. *This is not
241the time to solve additional and unrelated bugs!* If no patches are merged in,
242the release is determined to be ready and the release manager may move onto the
243next stage.
244
Renato Golin470172a2016-07-21 12:00:50 +0000245Reporting Regressions
246---------------------
247
248Every regression that is found during the tests (as per the criteria above),
249should be filled in a bug in Bugzilla with the priority *release blocker* and
250blocking a specific release.
251
252To help manage all the bugs reported and which ones are blockers or not, a new
253"[meta]" bug should be created and all regressions *blocking* that Meta. Once
254all blockers are done, the Meta can be closed.
255
256If a bug can't be reproduced, or stops being a blocker, it should be removed
257from the Meta and its priority decreased to *normal*. Debugging can continue,
258but on trunk.
259
Tom Stellardc902f6f2017-09-19 03:23:03 +0000260Merge Requests
261--------------
262
263You can use any of the following methods to request that a revision from trunk
264be merged into a release branch:
265
266#. Use the ``utils/release/merge-request.sh`` script which will automatically
Tom Stellard88520872017-09-19 03:27:26 +0000267 file a bug_ requesting that the patch be merged. e.g. To request revision
268 12345 be merged into the branch for the 5.0.1 release:
269 ``llvm.src/utils/release/merge-request.sh -stable-version 5.0 -r 12345 -user bugzilla@example.com``
Tom Stellardc902f6f2017-09-19 03:23:03 +0000270
271#. Manually file a bug_ with the subject: "Merge r12345 into the X.Y branch",
Tom Stellard88520872017-09-19 03:27:26 +0000272 enter the commit(s) that you want merged in the "Fixed by Commit(s)" and mark
273 it as a blocker of the current release bug. Release bugs are given aliases
274 in the form of release-x.y.z, so to mark a bug as a blocker for the 5.0.1
275 release, just enter release-5.0.1 in the "Blocks" field.
Tom Stellardc902f6f2017-09-19 03:23:03 +0000276
277#. Reply to the commit email on llvm-commits for the revision to merge and cc
Tom Stellard88520872017-09-19 03:27:26 +0000278 the release manager.
Tom Stellardc902f6f2017-09-19 03:23:03 +0000279
280.. _bug: https://bugs.llvm.org/
281
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000282Release Patch Rules
283-------------------
284
285Below are the rules regarding patching the release branch:
286
287#. Patches applied to the release branch may only be applied by the release
Renato Golin470172a2016-07-21 12:00:50 +0000288 manager, the official release testers or the code owners with approval from
289 the release manager.
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000290
291#. During the first round of testing, patches that fix regressions or that are
292 small and relatively risk free (verified by the appropriate code owner) are
293 applied to the branch. Code owners are asked to be very conservative in
294 approving patches for the branch. We reserve the right to reject any patch
295 that does not fix a regression as previously defined.
296
297#. During the remaining rounds of testing, only patches that fix critical
298 regressions may be applied.
299
Sylvestre Ledru84666a12016-02-14 20:16:22 +0000300#. For dot releases all patches must maintain both API and ABI compatibility with
Renato Golin470172a2016-07-21 12:00:50 +0000301 the previous major release. Only bug-fixes will be accepted.
Sean Silva216f1ee2014-03-02 00:21:42 +0000302
Vedant Kumar89763652016-01-25 22:47:54 +0000303Merging Patches
304^^^^^^^^^^^^^^^
305
Tom Stellard6f798e42020-10-22 11:33:58 -0700306Use the ``git cherry-pick -x`` command to merge patches to the release branch:
Vedant Kumar89763652016-01-25 22:47:54 +0000307
Tom Stellard6f798e42020-10-22 11:33:58 -0700308#. ``git cherry-pick -x abcdef0``
Vedant Kumar89763652016-01-25 22:47:54 +0000309
310#. Run regression tests.
311
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000312Release Final Tasks
313-------------------
314
315The final stages of the release process involves tagging the "final" release
316branch, updating documentation that refers to the release, and updating the
317demo page.
318
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000319Update Documentation
320^^^^^^^^^^^^^^^^^^^^
321
Tom Stellard6f798e42020-10-22 11:33:58 -0700322Review the documentation in the release branch and ensure that it is up
323to date. The "Release Notes" must be updated to reflect new features, bug
324fixes, new known issues, and changes in the list of supported platforms.
325The "Getting Started Guide" should be updated to reflect the new release
326version number tag available from Subversion and changes in basic system
327requirements.
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000328
329.. _tag:
330
331Tag the LLVM Final Release
332^^^^^^^^^^^^^^^^^^^^^^^^^^
333
Tom Stellard6f798e42020-10-22 11:33:58 -0700334Tag the final release sources:
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000335
336::
337
Tom Stellard6f798e42020-10-22 11:33:58 -0700338 $ git tag -a llvmorg-X.Y.Z
339 $ git push https://github.com/llvm/llvm-project.git llvmorg-X.Y.Z
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000340
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000341Update the LLVM Website
342^^^^^^^^^^^^^^^^^^^^^^^
343
344The website must be updated before the release announcement is sent out. Here
345is what to do:
346
Tom Stellard6f798e42020-10-22 11:33:58 -0700347#. Check out the ``www-releases`` module from GitHub.
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000348
Tom Stellard6f798e42020-10-22 11:33:58 -0700349#. Create a new sub-directory ``X.Y.Z`` in the releases directory.
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000350
351#. Copy and commit the ``llvm/docs`` and ``LICENSE.txt`` files into this new
Tom Stellard6f798e42020-10-22 11:33:58 -0700352 directory.
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000353
Tom Stellard6f798e42020-10-22 11:33:58 -0700354#. Update the ``releases/download.html`` file with links to the release
355 binaries on GitHub.
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000356
357#. Update the ``releases/index.html`` with the new release and link to release
358 documentation.
359
Tom Stellard6f798e42020-10-22 11:33:58 -0700360#. Finally checkout the llvm-www repo and update the main page
361 (``index.html`` and sidebar) to point to the new release and release
362 announcement.
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000363
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000364Announce the Release
365^^^^^^^^^^^^^^^^^^^^
366
Renato Golin470172a2016-07-21 12:00:50 +0000367Send an email to the list announcing the release, pointing people to all the
368relevant documentation, download pages and bugs fixed.
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000369