xref: /llvm-project/llvm/docs/ReleaseProcess.rst (revision 72fd1033ea577a769cc855fde6b5576b82380715)
16347551eSRenato Golin=============================
26347551eSRenato GolinHow To Validate a New Release
36347551eSRenato Golin=============================
46347551eSRenato Golin
56347551eSRenato Golin.. contents::
66347551eSRenato Golin   :local:
76347551eSRenato Golin   :depth: 1
86347551eSRenato Golin
96347551eSRenato GolinIntroduction
106347551eSRenato Golin============
116347551eSRenato Golin
1257c22698SJoel JonesThis document contains information about testing the release candidates that
1357c22698SJoel Joneswill ultimately be the next LLVM release. For more information on how to
1457c22698SJoel Jonesmanage the actual release, please refer to :doc:`HowToReleaseLLVM`.
156347551eSRenato Golin
166347551eSRenato GolinOverview of the Release Process
176347551eSRenato Golin-------------------------------
186347551eSRenato Golin
196347551eSRenato GolinOnce the release process starts, the Release Manager will ask for volunteers,
206347551eSRenato Golinand it'll be the role of each volunteer to:
216347551eSRenato Golin
226347551eSRenato Golin* Test and benchmark the previous release
236347551eSRenato Golin
2457c22698SJoel Jones* Test and benchmark each release candidate, comparing to the previous release
2557c22698SJoel Jones  and candidates
266347551eSRenato Golin
276347551eSRenato Golin* Identify, reduce and report every regression found during tests and benchmarks
286347551eSRenato Golin
296347551eSRenato Golin* Make sure the critical bugs get fixed and merged to the next release candidate
306347551eSRenato Golin
316347551eSRenato GolinNot all bugs or regressions are show-stoppers and it's a bit of a grey area what
3257c22698SJoel Jonesshould be fixed before the next candidate and what can wait until the next
3357c22698SJoel Jonesrelease.
346347551eSRenato Golin
356347551eSRenato GolinIt'll depend on:
366347551eSRenato Golin
3757c22698SJoel Jones* The severity of the bug, how many people it affects and if it's a regression
3857c22698SJoel Jones  or a known bug. Known bugs are "unsupported features" and some bugs can be
3957c22698SJoel Jones  disabled if they have been implemented recently.
406347551eSRenato Golin
4157c22698SJoel Jones* The stage in the release. Less critical bugs should be considered to be
4257c22698SJoel Jones  fixed between RC1 and RC2, but not so much at the end of it.
436347551eSRenato Golin
4457c22698SJoel Jones* If it's a correctness or a performance regression. Performance regression
4557c22698SJoel Jones  tends to be taken more lightly than correctness.
466347551eSRenato Golin
476347551eSRenato Golin.. _scripts:
486347551eSRenato Golin
496347551eSRenato GolinScripts
506347551eSRenato Golin=======
516347551eSRenato Golin
526347551eSRenato GolinThe scripts are in the ``utils/release`` directory.
536347551eSRenato Golin
546347551eSRenato Golintest-release.sh
556347551eSRenato Golin---------------
566347551eSRenato Golin
5757c22698SJoel JonesThis script will check-out, configure and compile LLVM+Clang (+ most add-ons,
5857c22698SJoel Joneslike ``compiler-rt``, ``libcxx``, ``libomp`` and ``clang-extra-tools``) in
5957c22698SJoel Jonesthree stages, and will test the final stage.
6057c22698SJoel JonesIt'll have installed the final binaries on the Phase3/Releasei(+Asserts)
6157c22698SJoel Jonesdirectory, and that's the one you should use for the test-suite and other
6257c22698SJoel Jonesexternal tests.
636347551eSRenato Golin
6411cb23a6SRenato GolinTo run the script on a specific release candidate run::
656347551eSRenato Golin
6611cb23a6SRenato Golin   ./test-release.sh \
676347551eSRenato Golin        -release 3.3 \
686347551eSRenato Golin        -rc 1 \
696347551eSRenato Golin        -no-64bit \
706347551eSRenato Golin        -test-asserts \
716347551eSRenato Golin        -no-compare-files
726347551eSRenato Golin
7357c22698SJoel JonesEach system will require different options. For instance, x86_64 will
7457c22698SJoel Jonesobviously not need ``-no-64bit`` while 32-bit systems will, or the script will
7557c22698SJoel Jonesfail.
766347551eSRenato Golin
776347551eSRenato GolinThe important flags to get right are:
786347551eSRenato Golin
7957c22698SJoel Jones* On the pre-release, you should change ``-rc 1`` to ``-final``. On RC2,
8057c22698SJoel Jones  change it to ``-rc 2`` and so on.
816347551eSRenato Golin
8257c22698SJoel Jones* On non-release testing, you can use ``-final`` in conjunction with
8357c22698SJoel Jones  ``-no-checkout``, but you'll have to create the ``final`` directory by hand
8457c22698SJoel Jones  and link the correct source dir to ``final/llvm.src``.
856347551eSRenato Golin
8657c22698SJoel Jones* For release candidates, you need ``-test-asserts``, or it won't create a
8757c22698SJoel Jones  "Release+Asserts" directory, which is needed for release testing and
8857c22698SJoel Jones  benchmarking. This will take twice as long.
8911cb23a6SRenato Golin
9057c22698SJoel Jones* On the final candidate you just need Release builds, and that's the binary
9157c22698SJoel Jones  directory you'll have to pack.
926347551eSRenato Golin
93a1e7efaaSVedant Kumar* On macOS, you must export ``MACOSX_DEPLOYMENT_TARGET=10.9`` before running
94a1e7efaaSVedant Kumar  the script.
95a1e7efaaSVedant Kumar
9657c22698SJoel JonesThis script builds three phases of Clang+LLVM twice each (Release and
9757c22698SJoel JonesRelease+Asserts), so use screen or nohup to avoid headaches, since it'll take
9857c22698SJoel Jonesa long time.
996347551eSRenato Golin
10057c22698SJoel JonesUse the ``--help`` option to see all the options and chose it according to
10157c22698SJoel Jonesyour needs.
1026347551eSRenato Golin
1036347551eSRenato Golin
1046347551eSRenato GolinfindRegressions-nightly.py
1056347551eSRenato Golin--------------------------
1066347551eSRenato Golin
1076347551eSRenato GolinTODO
1086347551eSRenato Golin
1096347551eSRenato Golin.. _test-suite:
1106347551eSRenato Golin
1116347551eSRenato GolinTest Suite
1126347551eSRenato Golin==========
1136347551eSRenato Golin
1146347551eSRenato Golin.. contents::
1156347551eSRenato Golin   :local:
1166347551eSRenato Golin
11757c22698SJoel JonesFollow the `LNT Quick Start Guide
118*72fd1033SSylvestre Ledru<https://llvm.org/docs/lnt/quickstart.html>`__ link on how to set-up the
11957c22698SJoel Jonestest-suite
1206347551eSRenato Golin
12157c22698SJoel JonesThe binary location you'll have to use for testing is inside the
12257c22698SJoel Jones``rcN/Phase3/Release+Asserts/llvmCore-REL-RC.install``.
12311cb23a6SRenato GolinLink that directory to an easier location and run the test-suite.
12411cb23a6SRenato Golin
1256347551eSRenato GolinAn example on the run command line, assuming you created a link from the correct
1266347551eSRenato Golininstall directory to ``~/devel/llvm/install``::
1276347551eSRenato Golin
1286347551eSRenato Golin   ./sandbox/bin/python sandbox/bin/lnt runtest \
1296347551eSRenato Golin       nt \
1306347551eSRenato Golin       -j4 \
1316347551eSRenato Golin       --sandbox sandbox \
1326347551eSRenato Golin       --test-suite ~/devel/llvm/test/test-suite \
1336347551eSRenato Golin       --cc ~/devel/llvm/install/bin/clang \
1346347551eSRenato Golin       --cxx ~/devel/llvm/install/bin/clang++
1356347551eSRenato Golin
13657c22698SJoel JonesIt should have no new regressions, compared to the previous release or release
13757c22698SJoel Jonescandidate. You don't need to fix all the bugs in the test-suite, since they're
13857c22698SJoel Jonesnot necessarily meant to pass on all architectures all the time. This is
13957c22698SJoel Jonesdue to the nature of the result checking, which relies on direct comparison,
14057c22698SJoel Jonesand most of the time, the failures are related to bad output checking, rather
14157c22698SJoel Jonesthan bad code generation.
14211cb23a6SRenato Golin
14357c22698SJoel JonesIf the errors are in LLVM itself, please report every single regression found
14457c22698SJoel Jonesas blocker, and all the other bugs as important, but not necessarily blocking
14557c22698SJoel Jonesthe release to proceed. They can be set as "known failures" and to be
14611cb23a6SRenato Golinfix on a future date.
14711cb23a6SRenato Golin
1486347551eSRenato Golin.. _pre-release-process:
1496347551eSRenato Golin
1506347551eSRenato GolinPre-Release Process
1516347551eSRenato Golin===================
1526347551eSRenato Golin
1536347551eSRenato Golin.. contents::
1546347551eSRenato Golin   :local:
1556347551eSRenato Golin
1566347551eSRenato GolinWhen the release process is announced on the mailing list, you should prepare
15757c22698SJoel Jonesfor the testing, by applying the same testing you'll do on the release
15857c22698SJoel Jonescandidates, on the previous release.
1596347551eSRenato Golin
1606347551eSRenato GolinYou should:
1616347551eSRenato Golin
16257c22698SJoel Jones* Download the previous release sources from
163*72fd1033SSylvestre Ledru  https://llvm.org/releases/download.html.
1646347551eSRenato Golin
16557c22698SJoel Jones* Run the test-release.sh script on ``final`` mode (change ``-rc 1`` to
16657c22698SJoel Jones  ``-final``).
1676347551eSRenato Golin
1686347551eSRenato Golin* Once all three stages are done, it'll test the final stage.
1696347551eSRenato Golin
17057c22698SJoel Jones* Using the ``Phase3/Release+Asserts/llvmCore-MAJ.MIN-final.install`` base,
17157c22698SJoel Jones  run the test-suite.
1726347551eSRenato Golin
17357c22698SJoel JonesIf the final phase's ``make check-all`` failed, it's a good idea to also test
17457c22698SJoel Jonesthe intermediate stages by going on the obj directory and running
17557c22698SJoel Jones``make check-all`` to find if there's at least one stage that passes (helps
17657c22698SJoel Joneswhen reducing the error for bug report purposes).
1776347551eSRenato Golin
1786347551eSRenato Golin.. _release-process:
1796347551eSRenato Golin
1806347551eSRenato GolinRelease Process
1816347551eSRenato Golin===============
1826347551eSRenato Golin
1836347551eSRenato Golin.. contents::
1846347551eSRenato Golin   :local:
1856347551eSRenato Golin
1866347551eSRenato GolinWhen the Release Manager sends you the release candidate, download all sources,
1876347551eSRenato Golinunzip on the same directory (there will be sym-links from the appropriate places
1886347551eSRenato Golinto them), and run the release test as above.
1896347551eSRenato Golin
1906347551eSRenato GolinYou should:
1916347551eSRenato Golin
19257c22698SJoel Jones* Download the current candidate sources from where the release manager points
193*72fd1033SSylvestre Ledru  you (ex. https://llvm.org/pre-releases/3.3/rc1/).
1946347551eSRenato Golin
19557c22698SJoel Jones* Repeat the steps above with ``-rc 1``, ``-rc 2`` etc modes and run the
19657c22698SJoel Jones  test-suite the same way.
1976347551eSRenato Golin
1986347551eSRenato Golin* Compare the results, report all errors on Bugzilla and publish the binary blob
1996347551eSRenato Golin  where the release manager can grab it.
2006347551eSRenato Golin
20157c22698SJoel JonesOnce the release manages announces that the latest candidate is the good one,
20257c22698SJoel Jonesyou have to pack the ``Release`` (no Asserts) install directory on ``Phase3``
20357c22698SJoel Jonesand that will be the official binary.
2046347551eSRenato Golin
20511cb23a6SRenato Golin* Rename (or link) ``clang+llvm-REL-ARCH-ENV`` to the .install directory
20611cb23a6SRenato Golin
207f65d4aa9SKazuaki Ishizaki* Tar that into the same name with ``.tar.gz`` extension from outside the
20857c22698SJoel Jones  directory
20911cb23a6SRenato Golin
21011cb23a6SRenato Golin* Make it available for the release manager to download
21111cb23a6SRenato Golin
2126347551eSRenato Golin.. _bug-reporting:
2136347551eSRenato Golin
2146347551eSRenato GolinBug Reporting Process
2156347551eSRenato Golin=====================
2166347551eSRenato Golin
2176347551eSRenato Golin.. contents::
2186347551eSRenato Golin   :local:
2196347551eSRenato Golin
2206347551eSRenato GolinIf you found regressions or failures when comparing a release candidate with the
2216347551eSRenato Golinprevious release, follow the rules below:
2226347551eSRenato Golin
22357c22698SJoel Jones* Critical bugs on compilation should be fixed as soon as possible, possibly
22457c22698SJoel Jones  before releasing the binary blobs.
2256347551eSRenato Golin
22657c22698SJoel Jones* Check-all tests should be fixed before the next release candidate, but can
22757c22698SJoel Jones  wait until the test-suite run is finished.
2286347551eSRenato Golin
2296347551eSRenato Golin* Bugs in the test suite or unimportant check-all tests can be fixed in between
2306347551eSRenato Golin  release candidates.
2316347551eSRenato Golin
23257c22698SJoel Jones* New features or recent big changes, when close to the release, should have
23357c22698SJoel Jones  done in a way that it's easy to disable. If they misbehave, prefer disabling
23457c22698SJoel Jones  them than releasing an unstable (but untested) binary package.
235