Commit Graph

15 Commits

Author SHA1 Message Date
Louis Dionne
3173faaff1
[🍒][ci] Fix the base branch we use to determine changes (#79503) (#79506)
We should diff against the base branch, not always against `main`. This
allows the BuildKite pre-commit CI to work properly when we target other
branches, such as `release/18.x`.

(cherry picked from commit 3b762891826192ded07286852d326f9c9060f52e)
2024-01-25 13:57:41 -08:00
Vitaly Buka
f01b6ca8be
[CI] Add lld as compiler-rt dependecy (#78536)
Fixing
https://buildkite.com/llvm-project/github-pull-requests/builds/30321#018d1a4a-bf72-449e-a70a-444ded875255

Co-authored-by: XinWang10 <108658776+XinWang10@users.noreply.github.com>
2024-01-17 21:10:54 -08:00
Vitaly Buka
004ec8ea1e
[ci] Set timeout for individual tests and report slowest tests (#76300)
There are builds like
https://buildkite.com/llvm-project/github-pull-requests/builds/24894

It looks like a deadlock in a test, but we can't see which one.
`--timeout=` will make lit kill and report such tests.

`--time-tests` produces nice report about slowest test, so we can tune
them over time.

The same build as above with new flags
https://buildkite.com/llvm-project/github-pull-requests/builds/24961
2024-01-10 10:39:33 -08:00
Benjamin Maxwell
2170252b44
[CI] Add check-mlir-python to MLIR pre-merge checks (#72847)
PR for: https://discourse.llvm.org/t/add-check-mlir-python-to-the-mlir-pre-commit-tests/74041

It’s easy to forget about the Python bindings and not build/test them
locally. It’s also easy to change something that’ll break the python
binding tests and not find out till after you’ve committed your change.

These tests seem to run quickly and don’t require much extra setup, so
let's add them to the general MLIR pre-merge tests.
2023-11-25 09:55:32 +00:00
Mikhail Goncharov
815193f6be
[ci] diff with main merge-base (#69308)
Basically a reland of ec9d80ec43 but now
with fetching of main before that to get a correct merge base.
2023-10-17 11:24:43 +02:00
Mikhail Goncharov
8e53abc041
[ci] pull main branch before diffing (#68983)
we tried to generate a full diff against main in
ec9d80e but it resulted in wrong diffs.

It seems that the issue was that 'main' was not
updated after agent restart and diff main...HEAD kept growing.

Not enabling diff main...HEAD just yet and will check logs for new PRs
first.
2023-10-16 11:22:58 +02:00
Louis Dionne
705d21f6ca Revert "[ci] Diff against main when determining what files have changed for pre-commit CI (#67743)"
This reverts commit ec9d80ec43, since we are currently seeing tons of
CI jobs being triggered spuriously.
2023-10-02 11:02:47 -04:00
Louis Dionne
ec9d80ec43
[ci] Diff against main when determining what files have changed for pre-commit CI (#67743)
Since we moved to Github PRs, the workflow has changed a bit and folks
often merge `main` back into their PR branch. This is fine, except the
previous way of determining modified files for pre-commit CI would use
the content modified just in the latest commit, whatever it is. This
means that in case someone merged main back into their PR branch, we'd
think that the files in the merge commit were modified by the PR, and
we'd spuriously trigger a CI run. This should fix this issue.

The downside is that the merge target is hardcoded to `main`, which
might not always be what we want. I still think this is an improvement
over the status quo.
2023-09-29 10:24:48 -04:00
Mikhail Goncharov
98a845c142
[ci] builkite don't escape windows targets (#66192)
ninja takes every target as a separate argument
2023-09-13 13:02:55 +02:00
Mikhail Goncharov
bcdba86f25 [ci] escape artifacts paths
That fixes issues like https://buildkite.com/llvm-project/github-pull-requests/builds/1350#018a8848-f70e-47f4-8aec-0bb48c49a7ca
2023-09-12 12:12:52 +02:00
Mikhail Goncharov
24846789f2
updated buildkite pipeline generation (#65574)
- fixed build for linux (clang was missing)

- removed /monolithic-.. from build directory - it does not add anything
and makes path longer for windows which is not great;

- added env-based configuration to control cache and agent targeting;

- print (s)ccache stats to file not to pullute normal log.
2023-09-11 13:20:34 +02:00
Mikhail Goncharov
8149989532 enable new pipeline 2023-08-31 18:17:53 +02:00
Mikhail Goncharov
c81ab62273 update pipeline generation script
- Add control over "modified files" set and agent targeting rules. Mostly for testing purposes.

- Moved sections that outputs "steps" after functions

- Added step that report back to Phabricator

That will allow to replace step generation from invocation of script https://github.com/google/llvm-premerge-checks/blob/main/scripts/pipeline_premerge.py to plain call to ".ci/generate-buildkite-pipeline-premerge".

Differential Revision: https://reviews.llvm.org/D159280
2023-08-31 16:18:42 +02:00
Louis Dionne
cf1a3d9358 Implement the monolithic CI pipeline in the monorepo
This basically inlines the logic that was previously located in
https://github.com/google/llvm-premerge-checks so it is part of
the monorepo. This has the benefit of making it extremely easy
for individual projects to understand and modify this logic for
their own needs, unlike the current model where this logic lives
in a separate non-LLVM repository.

It also allows testing changes to the CI configuration using a simple
Phabricator review, since the code that defines the CI pipeline is taken
from the patch under review.

This (or something equivalent) is necessary if we want to retain the
current monolithic pre-commit CI throughout the GitHub PR transition.
Since triggering the monolithic CI is currently attached to the system
we use for triggering CI pipelines from Phabricator, we will lose that
part of the CI when we move to GitHub PRs if we don't do anything.

I've decided to rewrite the code as a shell script because the logic
was fairly simple and it seemed a lot easier than figuring out how to
pull only the relevant parts of llvm-premerge-checks into the monorepo.
Furthermore, I think we should strive to move away from the monolithic
CI altogether since sub-projects should understand, own and maintain the
tests that are relevant for them to run in the CI (with LLVM providing
the infrastructure). Hence, this is somewhat of a temporary solution
until monolithic CI is removed entirely.

Differential Revision: https://reviews.llvm.org/D158863
2023-08-29 13:31:19 -04:00
Louis Dionne
298f207e06 [ci] Make libc++ and Clang CI scripts independent
This simply moves existing CI-related scripts for Clang outside of libc++
to make the two projects independent with respect to CI.

The reason for making this change is that libc++'s CI pipeline history
was full of Clang runs, making it a lot harder to figure out information
about libc++'s own jobs. I created a pipeline for Clang and this patch
will run pre-commit CI for Clang inside that pipeline instead.

Differential Revision: https://reviews.llvm.org/D155078
2023-07-12 14:01:38 -04:00