1
0
Fork 0
No description
Find a file
Mehdi Amini 6e624c30f9 Change the premerge checks to only check the affected projects
The current setup is configuring the "affected projects" as well
as their dependencies, and run `ninja all` followed by
`ninja check-all`.

This is quite a pessimization for leaf project which don't need to
build and run the tests for their dependencies.
For example a patch affecting only MLIR shouldn't need to build
and run LLVM and clang tests.
This patch changes this by running checks only for the affected
project. For example a patch touching `mlir` is affecting `mlir`
and `flang`. However `flang` depends on `clang`. So the list of
projects to configure is `mlir;flang;clang;llvm;`, but we want
to test only mlir and flang ; we'll run only `ninja check-mlir
check-flang`.

In practice in this example running `ninja all` builds 5658 targets
and `ninja check-all` after that adds 716 more targets. On the other
hands `ninja check-flang check-mlir` results in 3997 targets total.

Concretely the contract with premerge_checks.py is changed so that
the expected argument for the --projects flag is only the list of
affected project, dependencies are automatically added.
2021-09-21 14:28:38 +02:00
.github/ISSUE_TEMPLATE Update bug_report.md 2019-12-11 16:06:13 +01:00
containers Bump urllib3 from 1.26.4 to 1.26.5 in /containers/stats 2021-09-21 13:13:24 +02:00
docs Run bazel builds in premerge 2021-07-28 16:01:44 +02:00
kubernetes set BUILDKITE_BUILD_PATH for service agents 2021-06-18 12:32:07 +02:00
phabricator-proxy rename master to main branch following LLVM 2020-12-10 09:29:24 +01:00
scripts Change the premerge checks to only check the affected projects 2021-09-21 14:28:38 +02:00
.editorconfig review fixes, formatted text 2020-08-27 15:30:03 +02:00
.gitignore Organize scripts 2020-10-02 14:18:22 +02:00
k8s_config remove bucket as we don't use it anymore 2020-10-15 13:19:36 +02:00
LICENSE added license 2019-10-04 14:31:57 +02:00
local_setup.sh Update nginx configuration to capture all traffic to the static IP 2020-09-29 11:44:12 +02:00
README.md rename master to main branch following LLVM 2020-12-10 09:29:24 +01:00

Status

No known issues 🙈

Overview

The pre-merge checks for the LLVM project are a continuous integration (CI) workflow. The workflow checks the patches the developers upload to the LLVM Phabricator instance.

Phabricator (https://reviews.llvm.org) is the code review tool in the LLVM project.

The workflow checks the patches before a user merges them to the main branch - 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.

The CI system checks the patches before a user merges them to the main branch. This way bugs in a patch are contained during the code review stage and 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 become. citation needed

This repository contains the configurations and script to run pre-merge checks for the LLVM project.

Feedback

If you notice issues or have an idea on how to improve pre-merge checks, please create a new issue or give a ❤️ to an existing one.

Sign up for beta-test

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 on Phabricator.

Opt-out

In case you want to opt-out entirely of pre-merge testing, add yourself to the OPT OUT project.

If you decide to opt-out, please let us know why, so we might be able to improve in the future.

Requirements

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 a build.

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:

  • You set a git hash as sourceControlBaseRevision in Phabricator which is
  • available on the Github repository, or you define the dependencies of your
  • patch in Phabricator, or your patch can be applied to the main branch.

Only then can the build server apply the patch locally and run the builds and tests.

Accessing results on Phabricator

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

The CI will compile and run tests, run clang-format and clang-tidy on lines changed.

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.

Contributing

We're happy to get help on improving the infrastructure and workflows!

Please check contibuting first.

Development gives an overview how different parts interact together.

Playbooks shows concrete examples how to, for example, build and run agents locally.

If you have any questions please contact by mail or find user "goncharov" on LLVM Discord.

Additional Information

License

This project is licensed under the "Apache 2.0 with LLVM Exception" license. See LICENSE for details.