blob: e892e493a8d63a811ae3d5da83d11aa5adeebabf [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
69* Creating the release branch,
70
71* Setting version numbers, 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
78Branch the Subversion trunk using the following procedure:
79
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
85#. Verify that the current Subversion trunk is in decent shape by
86 examining nightly tester and buildbot results.
87
Renato Golin470172a2016-07-21 12:00:50 +000088#. Create the release branch for ``llvm``, ``clang``, and other sub-projects,
89 from the last known good revision. The branch's name is
Dmitri Gribenko7a936682012-12-07 16:42:48 +000090 ``release_XY``, where ``X`` is the major and ``Y`` the minor release
Renato Golin470172a2016-07-21 12:00:50 +000091 numbers. Use ``utils/release/tag.sh`` to tag the release.
Dmitri Gribenko7a936682012-12-07 16:42:48 +000092
93#. Advise developers that they may now check their patches into the Subversion
94 tree again.
95
96#. The Release Manager should switch to the release branch, because all changes
Dmitri Gribenko22470852012-12-09 15:33:26 +000097 to the release will now be done in the branch. The easiest way to do this is
Dmitri Gribenko7a936682012-12-07 16:42:48 +000098 to grab a working copy using the following commands:
99
100 ::
Dmitri Gribenko22470852012-12-09 15:33:26 +0000101
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000102 $ svn co https://llvm.org/svn/llvm-project/llvm/branches/release_XY llvm-X.Y
Dmitri Gribenko22470852012-12-09 15:33:26 +0000103
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000104 $ svn co https://llvm.org/svn/llvm-project/cfe/branches/release_XY clang-X.Y
Dmitri Gribenko22470852012-12-09 15:33:26 +0000105
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000106 $ svn co https://llvm.org/svn/llvm-project/test-suite/branches/release_XY test-suite-X.Y
107
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000108Update LLVM Version
109^^^^^^^^^^^^^^^^^^^
110
111After creating the LLVM release branch, update the release branches'
112``autoconf`` and ``configure.ac`` versions from '``X.Ysvn``' to '``X.Y``'.
113Update it on mainline as well to be the next version ('``X.Y+1svn``').
114Regenerate the configure scripts for both ``llvm`` and the ``test-suite``.
115
116In addition, the version numbers of all the Bugzilla components must be updated
117for the next release.
118
Tom Stellardcb98abe2015-07-31 01:02:35 +0000119Tagging the LLVM Release Candidates
120^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000121
Tom Stellardcb98abe2015-07-31 01:02:35 +0000122Tag release candidates using the tag.sh script in utils/release.
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000123
124::
125
Tom Stellardcb98abe2015-07-31 01:02:35 +0000126 $ ./tag.sh -release X.Y.Z -rc $RC
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000127
128The Release Manager may supply pre-packaged source tarballs for users. This can
Tom Stellardcb98abe2015-07-31 01:02:35 +0000129be done with the export.sh script in utils/release.
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000130
131::
132
Tom Stellardcb98abe2015-07-31 01:02:35 +0000133 $ ./export.sh -release X.Y.Z -rc $RC
Dmitri Gribenko22470852012-12-09 15:33:26 +0000134
Tom Stellardcb98abe2015-07-31 01:02:35 +0000135This will generate source tarballs for each LLVM project being validated, which
136can be uploaded to the website for further testing.
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000137
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000138Build Clang Binary Distribution
139^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
140
Renato Golin470172a2016-07-21 12:00:50 +0000141Creating the ``clang`` binary distribution requires following the instructions
142:doc:`here <ReleaseProcess>`.
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000143
Renato Golin470172a2016-07-21 12:00:50 +0000144That process will perform both Release+Asserts and Release builds but only
145pack the Release build for upload. You should use the Release+Asserts sysroot,
146normally under ``final/Phase3/Release+Asserts/llvmCore-3.8.1-RCn.install/``,
147for test-suite and run-time benchmarks, to make sure nothing serious has
148passed through the net. For compile-time benchmarks, use the Release version.
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000149
Renato Golin470172a2016-07-21 12:00:50 +0000150The minimum required version of the tools you'll need are :doc:`here <GettingStarted>`
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000151
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000152Release Qualification Criteria
153------------------------------
154
155A release is qualified when it has no regressions from the previous release (or
156baseline). Regressions are related to correctness first and performance second.
157(We may tolerate some minor performance regressions if they are deemed
158necessary for the general quality of the compiler.)
159
Renato Golin470172a2016-07-21 12:00:50 +0000160More specifically, Clang/LLVM is qualified when it has a clean test with all
161supported sub-projects included (``make check-all``), per target, and it has no
162regressions with the ``test-suite`` in relation to the previous release.
163
164Regressions are new failures in the set of tests that are used to qualify
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000165each product and only include things on the list. Every release will have
166some bugs in it. It is the reality of developing a complex piece of
167software. We need a very concrete and definitive release criteria that
168ensures we have monotonically improving quality on some metric. The metric we
169use is described below. This doesn't mean that we don't care about other
170criteria, but these are the criteria which we found to be most important and
Renato Golin470172a2016-07-21 12:00:50 +0000171which must be satisfied before a release can go out.
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000172
Renato Golin470172a2016-07-21 12:00:50 +0000173Official Testing
174----------------
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000175
Renato Golin470172a2016-07-21 12:00:50 +0000176A few developers in the community have dedicated time to validate the release
177candidates and volunteered to be the official release testers for each
178architecture.
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000179
Renato Golin470172a2016-07-21 12:00:50 +0000180These will be the ones testing, generating and uploading the official binaries
181to the server, and will be the minimum tests *necessary* for the release to
182proceed.
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000183
Renato Golin470172a2016-07-21 12:00:50 +0000184This will obviously not cover all OSs and distributions, so additional community
185validation is important. However, if community input is not reached before the
186release is out, all bugs reported will have to go on the next stable release.
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000187
Renato Golin470172a2016-07-21 12:00:50 +0000188The official release managers are:
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000189
Renato Golin470172a2016-07-21 12:00:50 +0000190* Major releases (X.0): Hans Wennborg
191* Stable releases (X.n): Tom Stellard
192
193The official release testers are volunteered from the community and have
194consistently validated and released binaries for their targets/OSs. To contact
195them, you should email the ``release-testers@lists.llvm.org`` mailing list.
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000196
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000197Community Testing
198-----------------
199
200Once all testing has been completed and appropriate bugs filed, the release
201candidate tarballs are put on the website and the LLVM community is notified.
Renato Golin470172a2016-07-21 12:00:50 +0000202
203We ask that all LLVM developers test the release in any the following ways:
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000204
205#. Download ``llvm-X.Y``, ``llvm-test-X.Y``, and the appropriate ``clang``
206 binary. Build LLVM. Run ``make check`` and the full LLVM test suite (``make
207 TEST=nightly report``).
208
209#. Download ``llvm-X.Y``, ``llvm-test-X.Y``, and the ``clang`` sources. Compile
210 everything. Run ``make check`` and the full LLVM test suite (``make
211 TEST=nightly report``).
212
Renato Golin470172a2016-07-21 12:00:50 +0000213#. Download ``llvm-X.Y``, ``llvm-test-X.Y``, and the appropriate ``clang``
214 binary. Build whole programs with it (ex. Chromium, Firefox, Apache) for
215 your platform.
216
217#. Download ``llvm-X.Y``, ``llvm-test-X.Y``, and the appropriate ``clang``
218 binary. Build *your* programs with it and check for conformance and
219 performance regressions.
220
221#. Run the :doc:`release process <ReleaseProcess>`, if your platform is
222 *different* than that which is officially supported, and report back errors
223 only if they were not reported by the official release tester for that
224 architecture.
225
226We also ask that the OS distribution release managers test their packages with
227the first candidate of every release, and report any *new* errors in Bugzilla.
228If the bug can be reproduced with an unpatched upstream version of the release
229candidate (as opposed to the distribution's own build), the priority should be
230release blocker.
Dmitri Gribenko22470852012-12-09 15:33:26 +0000231
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000232During the first round of testing, all regressions must be fixed before the
233second release candidate is tagged.
Dmitri Gribenko22470852012-12-09 15:33:26 +0000234
Renato Golin470172a2016-07-21 12:00:50 +0000235In the subsequent stages, the testing is only to ensure that bug
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000236fixes previously merged in have not created new major problems. *This is not
237the time to solve additional and unrelated bugs!* If no patches are merged in,
238the release is determined to be ready and the release manager may move onto the
239next stage.
240
Renato Golin470172a2016-07-21 12:00:50 +0000241Reporting Regressions
242---------------------
243
244Every regression that is found during the tests (as per the criteria above),
245should be filled in a bug in Bugzilla with the priority *release blocker* and
246blocking a specific release.
247
248To help manage all the bugs reported and which ones are blockers or not, a new
249"[meta]" bug should be created and all regressions *blocking* that Meta. Once
250all blockers are done, the Meta can be closed.
251
252If a bug can't be reproduced, or stops being a blocker, it should be removed
253from the Meta and its priority decreased to *normal*. Debugging can continue,
254but on trunk.
255
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000256Release Patch Rules
257-------------------
258
259Below are the rules regarding patching the release branch:
260
261#. Patches applied to the release branch may only be applied by the release
Renato Golin470172a2016-07-21 12:00:50 +0000262 manager, the official release testers or the code owners with approval from
263 the release manager.
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000264
265#. During the first round of testing, patches that fix regressions or that are
266 small and relatively risk free (verified by the appropriate code owner) are
267 applied to the branch. Code owners are asked to be very conservative in
268 approving patches for the branch. We reserve the right to reject any patch
269 that does not fix a regression as previously defined.
270
271#. During the remaining rounds of testing, only patches that fix critical
272 regressions may be applied.
273
Sylvestre Ledru84666a12016-02-14 20:16:22 +0000274#. For dot releases all patches must maintain both API and ABI compatibility with
Renato Golin470172a2016-07-21 12:00:50 +0000275 the previous major release. Only bug-fixes will be accepted.
Sean Silva216f1ee2014-03-02 00:21:42 +0000276
Vedant Kumar89763652016-01-25 22:47:54 +0000277Merging Patches
278^^^^^^^^^^^^^^^
279
280The ``utils/release/merge.sh`` script can be used to merge individual revisions
281into any one of the llvm projects. To merge revision ``$N`` into project
282``$PROJ``, do:
283
Sanjoy Dasf113a1f2016-01-26 23:26:25 +0000284#. ``svn co https://llvm.org/svn/llvm-project/$PROJ/branches/release_XX
Vedant Kumar89763652016-01-25 22:47:54 +0000285 $PROJ.src``
286
287#. ``$PROJ.src/utils/release/merge.sh --proj $PROJ --rev $N``
288
289#. Run regression tests.
290
291#. ``cd $PROJ.src``. Run the ``svn commit`` command printed out by ``merge.sh``
292 in step 2.
293
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000294Release Final Tasks
295-------------------
296
297The final stages of the release process involves tagging the "final" release
298branch, updating documentation that refers to the release, and updating the
299demo page.
300
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000301Update Documentation
302^^^^^^^^^^^^^^^^^^^^
303
304Review the documentation and ensure that it is up to date. The "Release Notes"
305must be updated to reflect new features, bug fixes, new known issues, and
306changes in the list of supported platforms. The "Getting Started Guide" should
307be updated to reflect the new release version number tag available from
308Subversion and changes in basic system requirements. Merge both changes from
309mainline into the release branch.
310
311.. _tag:
312
313Tag the LLVM Final Release
314^^^^^^^^^^^^^^^^^^^^^^^^^^
315
Tom Stellardcb98abe2015-07-31 01:02:35 +0000316Tag the final release sources using the tag.sh script in utils/release.
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000317
318::
319
Tom Stellardcb98abe2015-07-31 01:02:35 +0000320 $ ./tag.sh -release X.Y.Z -final
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000321
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000322Update the LLVM Demo Page
323-------------------------
324
325The LLVM demo page must be updated to use the new release. This consists of
326using the new ``clang`` binary and building LLVM.
327
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000328Update the LLVM Website
329^^^^^^^^^^^^^^^^^^^^^^^
330
331The website must be updated before the release announcement is sent out. Here
332is what to do:
333
334#. Check out the ``www`` module from Subversion.
335
Renato Golin470172a2016-07-21 12:00:50 +0000336#. Create a new sub-directory ``X.Y`` in the releases directory.
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000337
Renato Golin470172a2016-07-21 12:00:50 +0000338#. Commit the ``llvm``, ``test-suite``, ``clang`` source and binaries in this
339 new directory.
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000340
341#. Copy and commit the ``llvm/docs`` and ``LICENSE.txt`` files into this new
342 directory. The docs should be built with ``BUILD_FOR_WEBSITE=1``.
343
344#. Commit the ``index.html`` to the ``release/X.Y`` directory to redirect (use
345 from previous release).
346
347#. Update the ``releases/download.html`` file with the new release.
348
349#. Update the ``releases/index.html`` with the new release and link to release
350 documentation.
351
352#. Finally, update the main page (``index.html`` and sidebar) to point to the
353 new release and release announcement. Make sure this all gets committed back
354 into Subversion.
355
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000356Announce the Release
357^^^^^^^^^^^^^^^^^^^^
358
Renato Golin470172a2016-07-21 12:00:50 +0000359Send an email to the list announcing the release, pointing people to all the
360relevant documentation, download pages and bugs fixed.
Dmitri Gribenko7a936682012-12-07 16:42:48 +0000361