2020-09-28 14:10:53 +02:00
|
|
|
# Status
|
|
|
|
|
2021-10-04 12:43:42 +02:00
|
|
|
Premerge checks are disabled due a high number of false positives.
|
2020-09-28 14:10:53 +02:00
|
|
|
|
2019-10-04 10:26:20 +02:00
|
|
|
# Overview
|
|
|
|
|
2022-01-10 11:39:14 +01:00
|
|
|
Presentation by Louis Dione on LLVM devmtg 2021 https://youtu.be/B7gB6van7Bw
|
|
|
|
|
|
|
|
[![IMAGE ALT TEXT HERE](https://img.youtube.com/vi/B7gB6van7Bw/0.jpg)](https://www.youtube.com/watch?v=B7gB6van7Bw)
|
|
|
|
|
2020-08-27 15:24:16 +02:00
|
|
|
The *pre-merge checks* for the [LLVM project](http://llvm.org/) are a
|
|
|
|
[continuous integration
|
|
|
|
(CI)](https://en.wikipedia.org/wiki/Continuous_integration) workflow. The
|
|
|
|
workflow checks the patches the developers upload to the [LLVM
|
|
|
|
Phabricator](https://reviews.llvm.org) instance.
|
2019-10-04 10:26:20 +02:00
|
|
|
|
2020-08-27 15:24:16 +02:00
|
|
|
*Phabricator* (https://reviews.llvm.org) is the code review tool in the LLVM
|
|
|
|
project.
|
2019-11-04 10:33:41 +01:00
|
|
|
|
2020-12-09 17:23:01 +01:00
|
|
|
The workflow checks the patches before a user merges them to the main branch -
|
2020-08-27 15:24:16 +02:00
|
|
|
thus the term *pre-merge testing**. When a user uploads a patch to the LLVM
|
|
|
|
Phabricator, Phabricator triggers the checks and then displays the results.
|
|
|
|
|
2020-12-09 17:23:01 +01:00
|
|
|
The CI system checks the patches **before** a user merges them to the main
|
2020-08-27 15:24:16 +02:00
|
|
|
branch. This way bugs in a patch are contained during the code review stage and
|
2020-12-09 17:23:01 +01:00
|
|
|
do not pollute the main branch. The more bugs the CI system can catch during
|
|
|
|
the code review phase, the more stable and bug-free the main branch will
|
2020-08-27 15:24:16 +02:00
|
|
|
become. <sup>[citation needed]()</sup>
|
|
|
|
|
|
|
|
This repository contains the configurations and script to run pre-merge checks
|
|
|
|
for the LLVM project.
|
2019-10-05 08:43:30 +02:00
|
|
|
|
2020-08-27 11:21:35 +02:00
|
|
|
## Feedback
|
2019-10-05 08:43:30 +02:00
|
|
|
|
2020-08-27 15:24:16 +02:00
|
|
|
If you notice issues or have an idea on how to improve pre-merge checks, please
|
|
|
|
create a [new issue](https://github.com/google/llvm-premerge-checks/issues/new)
|
|
|
|
or give a :heart: to an existing one.
|
2020-08-27 11:21:35 +02:00
|
|
|
|
|
|
|
## Sign up for beta-test
|
2019-10-04 10:26:20 +02:00
|
|
|
|
2020-08-27 15:24:16 +02:00
|
|
|
To get the latest features and help us developing the project, sign up for the
|
|
|
|
pre-merge beta testing by adding yourself to the ["pre-merge beta testing"
|
|
|
|
project](https://reviews.llvm.org/project/members/78/) on Phabricator.
|
2019-10-10 09:27:31 +02:00
|
|
|
|
2020-08-27 11:21:35 +02:00
|
|
|
## Opt-out
|
2019-10-07 11:47:58 +02:00
|
|
|
|
2020-08-27 15:24:16 +02:00
|
|
|
In case you want to opt-out entirely of pre-merge testing, add yourself to the
|
|
|
|
[OPT OUT project](https://reviews.llvm.org/project/view/83/).
|
2019-10-07 11:47:58 +02:00
|
|
|
|
2020-08-27 15:24:16 +02:00
|
|
|
If you decide to opt-out, please let us know why, so we might be able to improve
|
|
|
|
in the future.
|
2019-10-07 11:47:58 +02:00
|
|
|
|
2020-08-27 11:21:35 +02:00
|
|
|
# Requirements
|
|
|
|
|
2020-08-27 15:24:16 +02:00
|
|
|
The builds are only triggered if the Revision in Phabricator is created/updated
|
|
|
|
via `arc diff`. If you update a Revision via the Web UI it will [not
|
|
|
|
trigger](https://secure.phabricator.com/Q447) a build.
|
2020-08-27 11:21:35 +02:00
|
|
|
|
2020-08-27 15:24:16 +02:00
|
|
|
To get a patch on Phabricator tested the build server must be able to apply the
|
|
|
|
patch to the checked out git repository. If you want to get your patch tested,
|
|
|
|
please make sure that either:
|
2020-08-27 11:21:35 +02:00
|
|
|
|
2020-08-27 15:24:16 +02:00
|
|
|
* You set a git hash as `sourceControlBaseRevision` in Phabricator which is
|
|
|
|
* available on the Github repository, **or** you define the dependencies of your
|
2020-12-09 17:23:01 +01:00
|
|
|
* patch in Phabricator, **or** your patch can be applied to the main branch.
|
2020-08-27 11:21:35 +02:00
|
|
|
|
2020-08-27 15:24:16 +02:00
|
|
|
Only then can the build server apply the patch locally and run the builds and
|
|
|
|
tests.
|
2020-08-27 11:21:35 +02:00
|
|
|
|
|
|
|
# Accessing results on Phabricator
|
|
|
|
|
2020-08-27 15:24:16 +02:00
|
|
|
Phabricator will automatically trigger a build for every new patch you upload or
|
|
|
|
modify. Phabricator shows the build results at the top of the entry: ![build
|
|
|
|
status](docs/images/diff_detail.png)
|
2020-08-27 11:21:35 +02:00
|
|
|
|
2020-08-27 15:24:16 +02:00
|
|
|
The CI will compile and run tests, run clang-format and
|
|
|
|
[clang-tidy](docs/clang_tidy.md) on lines changed.
|
2020-08-27 11:21:35 +02:00
|
|
|
|
2020-08-27 15:24:16 +02:00
|
|
|
If a unit test failed, this is shown below the build status. You can also expand
|
|
|
|
the unit test to see the details: ![unit test
|
|
|
|
results](docs/images/unit_tests.png).
|
2020-08-27 11:21:35 +02:00
|
|
|
|
|
|
|
# Contributing
|
|
|
|
|
|
|
|
We're happy to get help on improving the infrastructure and workflows!
|
|
|
|
|
|
|
|
Please check [contibuting](docs/contributing.md) first.
|
|
|
|
|
2020-08-27 15:24:16 +02:00
|
|
|
[Development](docs/development.md) gives an overview how different parts
|
|
|
|
interact together.
|
|
|
|
|
|
|
|
[Playbooks](docs/playbooks.md) shows concrete examples how to, for example,
|
|
|
|
build and run agents locally.
|
|
|
|
|
|
|
|
If you have any questions please contact by [mail](mailto:goncahrov@google.com)
|
2021-11-18 07:21:47 +01:00
|
|
|
or find user "goncharov" on [LLVM Discord](https://discord.gg/xS7Z362).
|
2019-10-04 10:26:20 +02:00
|
|
|
|
2019-10-29 13:56:40 +01:00
|
|
|
# Additional Information
|
2020-08-27 15:24:16 +02:00
|
|
|
|
|
|
|
- [Playbooks](docs/playbooks.md) for installing/upgrading agents and testing
|
|
|
|
changes.
|
|
|
|
|
|
|
|
- [Log of the service
|
|
|
|
operations](https://github.com/google/llvm-premerge-checks/wiki/LLVM-pre-merge-tests-operations-blog)
|
2019-10-09 18:29:44 +02:00
|
|
|
|
2019-10-04 14:31:57 +02:00
|
|
|
# License
|
2020-08-27 15:24:16 +02:00
|
|
|
|
|
|
|
This project is licensed under the "Apache 2.0 with LLVM Exception" license. See
|
|
|
|
[LICENSE](LICENSE) for details.
|