1
0
Fork 0
Commit graph

23 commits

Author SHA1 Message Date
Mikhail Goncharov
722d4632f3 disable generating generic windows and linux from premerge script 2023-08-31 14:14:43 +02:00
Louis Dionne
a725f9ea89 Move the pipeline generation scripts outside of libc++ 2023-07-12 18:05:52 +02:00
Mikhail Goncharov
77cbb15b64 fix excessive environment copying 2021-10-04 16:58:52 +02:00
Mikhail Goncharov
df318ccf4f fix project resolutions
and some of the typing issues found by mypy
2021-10-04 16:07:06 +02:00
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
Mikhail Goncharov
307a6e71ee Only override 'head' alias
For branch runs buildkite assigns a correct commit hash.
For #344.
2021-08-30 18:26:46 +02:00
Mikhail Goncharov
49be688a27 script to sync fork llvm-premerge-tests/llvm-project
- uniformly append env variables

- resolve current HEAD and pass it as BUILDKITE_COMMIT to script
generators. Add it as ph_commit_sha.
2021-08-11 16:25:29 +02:00
Mikhail Goncharov
6c2410440e Run bazel builds in premerge
if user is a member of "bazel_build" https://reviews.llvm.org/project/view/107/
or modified /utils/bazel/*

For #328
2021-07-28 16:01:44 +02:00
Mikhail Goncharov
1b116862e6 Fix modified projects resolution when there are unmapped changes
for #325
2021-07-23 09:30:53 +02:00
Mikhail Goncharov
6b731dc4d5 set build info in metadata 2021-05-03 21:07:30 +02:00
Mikhail Goncharov
08bb6492fa service queue 2021-04-26 19:56:20 +00:00
Mikhail Goncharov
f53c519843 updated docs on windows dev, new setting to skip generated steps 2021-03-19 09:22:21 +01:00
Mikhail Goncharov
99e43a8d9a rename master to main branch following LLVM 2020-12-10 09:29:24 +01:00
Mikhail Goncharov
681fbbe2cf Process results and unit-test output of libcxx
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
2020-11-25 15:29:50 +01:00
Mikhail Goncharov
43fae020f5 retry most of the requests with backoff
fixes #192

additionally:

- install python libs after scripts checkout, so we don't need to
rebuild images and restart agents only to add a new python dependency

- updated lib versions

- similar scripts checkout in steps
2020-10-12 17:08:34 +02:00
Mikhail Goncharov
322cfbda8c Add link to the build in "setup" step 2020-10-09 12:51:32 +02:00
Mikhail Goncharov
3df81c372f Do not run generic steps if project list is empty 2020-10-09 12:35:32 +02:00
Mikhail Goncharov
3925a2a844 get libcxx steps from sh output 2020-10-09 11:06:36 +02:00
Mikhail Goncharov
ab1b8d5ae2 Use buildkite API instead of passing stat via files
Previous approach had drawbacks:

- every step had to implement exporting of results in fixed format

- if step failed then failure will not be detected

Now report step will fetch results directly from Buildkite.
Agents have to be updated to have BUILDKITE_API_TOKEN env.
2020-10-08 14:40:57 +02:00
Mikhail Goncharov
1bbd71f712 Fix project exclusion rules
Previously list of projects was resolved when job run at target OS.
Now project resolution is moved to the premerge pipeline and logic
should be there.
2020-10-08 12:08:57 +02:00
Mikhail Goncharov
5cd16dde45 Don't fail if phabricator target is not specified
That is useful when testing pipelines
2020-10-05 13:33:19 +02:00
Mikhail Goncharov
c350101a23 Allow projects to define custom steps
Now it's possible to allow sub-projects to define own checks and skip
"generic" ones.

To properly accomodate affected projects that might not have special
treatment we:

1. extend the set of affected projecs with dependent (e.g. add 'libc' if
'clang' was modified)

2. add custom steps for projects that define own workflow. At the moment
it's only libcxx and it has a custom trigger pipeline so it's noop.

3. add dependent projects and run generic check on them.

To illustrate: imagine that we have a dependency graph:

llvm -> clang -> openmp

and only clang was modified in a diff; also clang defines own checks.
Thus list of affected projects will be [clang, openmp].
After adding custom checks and removing their projecst: [openmp].
After adding dependencies: [llvm, clang, openmp]. Generic linux /
windows checks will be run on thouse 3 projects.
So as you can see in some scenarios projects with custom checks will
still go through generic checks.

Note that clang-format and clang-tidy checks are run only for "generic"
checks at the moment.
2020-10-02 16:19:57 +02:00
Mikhail Goncharov
c082f1aa9b Organize scripts
Move all .py that are supposed to be run as __main__ under ./scripts
so there is no need to manipulate sys.path to import modules.

Runby cleanup
2020-10-02 14:18:22 +02:00
Renamed from scripts/buildkite/build_branch_pipeline.py (Browse further)