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.
Now "report" step combines result in a uniform way and processes unit test
results XML output. It works for sub-builds only started from the 'premerge'
pipeline, i.e. non-recursive. One downside is that now one has to wait until
all jobs have finished.
- Add instructions to setup python environment
- added option to do full report cycle but not call Phabricator
- use "annotations" to show build status. That lifts the need to filter ninja
and other output (thus `ph_no_filter_output` param removed) and output
everything. That is nice as script failures no longer lead to loss of logs.
- improved annotate() usability
- misc fixes
- Fix for #207. Previously grep was exiting with 1 and fail build if all
lines from ninja are filtered. Also piping might hide exit code of the
initial command. Now "tee" and "grep" is implemented on python level
and we get exit code of the original command.
- Fixed default value of "scripts_branch", print scripts commit;
- Added option to filter ninja output (on by default as before).
- Copied cache usege reporting and error handling from "master" branch
build to diff checks (useful for debugging).
apt.llvm.org signature has changed, we also should use debian:stable
(=buster) as a base image to correctly install packages.
Removed jdk from the base image as it was used only by Jenkins.
Log packages version for every build.
Related issues: #112
- configured sccache on buildkite windows machines
- final result is sent to phabricator from "summary.py" that waits for both builds to complete
- extracted "add_url_artifact" to a runnable script
- reorganized code and fixed some of TODOs