143 Commits

Author SHA1 Message Date
Aiden Grossman
0319a7970d
[CI] Disable PIE on Linux Premerge Builds (#154584)
We do not gain any additional security from having PIE on the test
binaries, and this does have an impact on test times. It is about 10%
from my measurements. Not as much as previous reports
(https://reviews.llvm.org/D140880), but still significant. This is a
similar gain to finish enabling the lit internal shell, which will take
significantly more effort. I also do not think this is a meaningful
enough difference from the "default" configuration to keep it the
default, especially given the option is mostly set by distros.
2025-08-21 10:21:02 -07:00
Michael Buch
d9d5090b03
[CI] Run LLDB tests on Clang changes in pre-merge CI (#154154)
This attempts https://github.com/llvm/llvm-project/issues/132795 again.
Last time we tried this we didn't have enough infra capacity, so had to
revert. According to recent communication from the Infrastructure Area
Team, we should now have enough capacity to re-enable the LLDB tests.
2025-08-19 09:44:08 +01:00
Aiden Grossman
ddae3b74a3 [CI] Show Stats in CI Log
This patch makes utils.sh also print the stats out. This is particularly
useful in postcommit CI where we are currently not saving artifacts.
2025-08-16 20:55:45 +00:00
Aiden Grossman
fb70f51fec
[CI][Github] Fix Premerge Summary for Build Failures (#153076)
We were passing the wrong directory to `generate_test_report_github.py`,
so no logs actually got passed there. This fixes that and ensures that
the logs are uploaded as artifacts to enable future debugging.
2025-08-11 15:37:55 -07:00
Aiden Grossman
7d5af16245
[CI] Enable Build Failure Reporting
This patch finishes up the plumbing so that generate_test_report will dump build
failures into the Github checks summary.

Reviewers: Keenuts, lnihlen, dschuff, gburgessiv, cmtice, DavidSpickett

Reviewed By: cmtice, DavidSpickett

Pull Request: https://github.com/llvm/llvm-project/pull/152622
2025-08-08 09:44:59 -07:00
Aiden Grossman
869bce23fd
[CI] Setup generate_report to describe ninja failures
This patch makes it so that generate_report will add information about
failed build actions to the summary report. This makes it significantly
easier to find compilation failures, especially given we run ninja with
-k 0.

This patch only does the integration into generate_report (along with
testing). Actual utilization in the script is split into a separate
patch to try and keep things clean.

Reviewers: dschuff, cmtice, DavidSpickett, Keenuts, lnihlen, gburgessiv

Reviewed By: cmtice, DavidSpickett

Pull Request: https://github.com/llvm/llvm-project/pull/152621
2025-08-08 09:44:04 -07:00
Aiden Grossman
83dd7d97bd
[CI] Add Support for Parsing Ninja Logs to generate_test_report_lib
This patch adds in support for taking the CLI output from ninja and
parsing it for failures. This is intended to be used in the cases where
all tests pass (or none have run), but the build fails to easily surface
where exactly the build failed.

The actual integration will happen in a future patch.

Reviewers: gburgessiv, dschuff, lnihlen, DavidSpickett, Keenuts, cmtice

Reviewed By: DavidSpickett, cmtice

Pull Request: https://github.com/llvm/llvm-project/pull/152620
2025-08-08 08:42:25 -07:00
Aiden Grossman
536e414b14
[CI] Tee Ninja Output to Log Files
This patch makes all of the ninja commands in the monolithic-* scripts
write to log files in the current working directory. The plan is to use
this to feed the ninja log into generate_test_report_github.py so we can
surface compilation errors.

Related to #152246.

Reviewers: Keenuts, lnihlen, cmtice, dschuff, gburgessiv

Reviewed By: Keenuts, cmtice

Pull Request: https://github.com/llvm/llvm-project/pull/152331
2025-08-07 14:02:19 -07:00
Aiden Grossman
cfa00d4daf
[CI] Add --succinct to lit args (#152335)
We currently log every single test that we run in premerge. This leads
to gigantic logs (200k+ lines on Linux) that can be difficult to parse
through. Having an indicator of progress is nice, especially for the
LLVM tests, but is not strictly necessary and not often used (I
imagine). Having a progress indicator from lit that works in CI cases is
on my TODO list.

For the rare cases where someone does need to see the list of tests that
run, the JUnit XML emitted by lit is available in the artifacts.
2025-08-07 06:01:29 -07:00
Vitaly Buka
0168324523
[CI] Test compiler-rt when it's changed (#152425) 2025-08-06 20:02:48 -07:00
Aiden Grossman
d54aa36146
[CI] Refactor monolithic-* scripts to use common utils.sh
This patch refactors big chunks of the common functionality shared
between monolithic-linux.sh and monolithic-windows.sh to a separate
script, utils.sh, that is then sourced in both of the files. This makes
it a bit easier to maintain the scripts.

Platform differences should not be a large deal for the setup here as we
are using bash as the shell on both Linux and Windows.

Reviewers:
lnihlen, gburgessiv, Keenuts, DavidSpickett, dschuff, cmtice, Endilll

Reviewed By: DavidSpickett, cmtice

Pull Request: https://github.com/llvm/llvm-project/pull/152199
2025-08-06 15:00:51 -07:00
Aiden Grossman
01b0fe3104
[CI][NFC] Explicitly add libcxx/libcxxabi/libunwind to excludes (#152210)
This patch adds libcxx/libcxxabi/libunwind to the excludes list in
compute_projects.py for both Windows and MacOS. Neither of these
platforms have ever built the runtimes as the scripts do not have
support for it. Explicitly disable them so that compute_projects_test.py
is more consistent.
2025-08-06 09:42:21 -07:00
Aiden Grossman
bd9117c569
[CI] Move platform specific test report titles to python
This patch moves the platform specific test report titles to the
generate_test_report_github.py script. This means that the functions in
the monolithic-* scripts are exactly the same now and can be moved into
a separate script that can be shared between the two scripts.

Reviewers: DavidSpickett, cmtice, lnihlen, dschuff, Keenuts, gburgessiv

Reviewed By: DavidSpickett

Pull Request: https://github.com/llvm/llvm-project/pull/152198
2025-08-06 08:17:48 -07:00
Aiden Grossman
0d7c8691fb
[CI] Make monolithic-* scripts only run Github steps on Github
We run a couple Github only steps in the monolithic-* scripts like
writing to $GITHUB_STEP_SUMMARY and denoting log groups. These can throw
errors when running the scripts locally or as part of other CI systems
(like buildbot). This patch makes it so that we only run these commands
when in the relevant environment. We also add a $POSTCOMMIT_CI check for
groups so that the annotated builder in buildbot works properly with
these scripts.

Reviewers: cmtice, ldionne, Endilll, gburgessiv, Keenuts, dschuff, lnihlen

Pull Request: https://github.com/llvm/llvm-project/pull/152197
2025-08-06 06:19:01 -07:00
Aiden Grossman
e8a87da482 [CI] Add test for projects list for .ci on Windows
Partially to give me something to copy and paste into other scripts that
need to run all of the tests on Windows and partially to increase test
coverage on Windows. This does expose an issue with the script on
Windows, so that needs to be fixed. Given it does not impact anything it
should be fine for now though.
2025-08-05 16:22:29 +00:00
Aiden Grossman
c12dfd5195
[CI] Add unittesting for metrics collection script
This patch adds some initial unittests for the metrics collection
script. This initial patch focuses on getting the files setup and adding
unittests for uploading metrics. A subsequent patch will add tests for
the workflow collection which is significantly more complicated.

Reviewers: Keenuts, gburgessiv, dschuff, cmtice, lnihlen

Reviewed By: cmtice

Pull Request: https://github.com/llvm/llvm-project/pull/150360
2025-07-24 12:25:31 -07:00
Aiden Grossman
2149d6d1c9
[CI] Run All Tests When Changing third-party
This patch ensures that we run all the tests when someone touches
third-party. Some of the projects (like SipHash and Benchmark) do not
get used by every project and we could get away with testing less.
However, it takes quite a bit of effort to tease out what actually does
depend on which library, it is liable to becoming out of date, and it
adds complexity. Just testing all the projects is simple. Given the
commit frequency to third-party is pretty low (a couple commits per
month), we should have no capacity problems here.

Fixes #149154

Reviewers: dschuff, gburgessiv, Keenuts, lnihlen, dpaoliello, cmtice

Reviewed By: dpaoliello

Pull Request: https://github.com/llvm/llvm-project/pull/150251
2025-07-24 06:34:33 -07:00
Aiden Grossman
08e7c17c7a
[CI] Test All Projects On Workflow Changes
This patch makes it so that we actually run all the tests when we touch
the workflow file in .github/workflows/premerge.yaml. Before this we
would not run any tests and it was annoying to have to manually touch a
file to get something to trigger.

Reviewers: Keenuts, lnihlen, cmtice, dschuff, gburgessiv

Reviewed By: gburgessiv

Pull Request: https://github.com/llvm/llvm-project/pull/150250
2025-07-24 06:33:37 -07:00
Aiden Grossman
b5c8795153
[CI] Refactor compute_projects to Introduce Meta Projects
This patch introduces the concept of meta projects into the
compute_projects script. Meta projects are projects like CIR and
GoogleTest where they do not have their own top level project. This
patch adds a little bit of extra code in exchange for making meta
projects a first level concept that can be configured almost entirely by
changing around the mappings at the top of the file. This patch also
refactors the project skipping functionality to use meta projects.

This (arguably) makes the CIR support a little bit cleaner and is
necessary for some future improvements like running all the tests on
Github workflow changes and running tests when third-party changes.

Reviewers: Endilll, andykaylor, lnihlen, gburgessiv, dschuff, Keenuts, cmtice

Reviewed By: andykaylor

Pull Request: https://github.com/llvm/llvm-project/pull/150249
2025-07-24 06:32:31 -07:00
Aiden Grossman
2238365a65 [CI] Minor script cleanups
The metrics script did not have a license header or a docstring. The
compute_projects_test.py file had a placeholder module level docstring
that I edited into something more reasonable.
2025-07-24 01:16:19 +00:00
Andy Kaylor
afff28e4cb
[CI][Github] Enable CIR CI build and test (#147430)
This change modifies CI scripts to add a pseudo-project for CIR and
detect when CIR-specific files are modified. It also enables building
clang with CIR enabled whenever both the clang and mlir projects are
being built.

Building and testing CIR is only enabled on Linux at this time, as CIR
doesn't properly support Windows or MacOS yet.
2025-07-17 11:17:52 -07:00
Aiden Grossman
871d65bfdd
[CI] Migrate monolithic-linux script to sccache
This is in preparation for migrating to Google Cloud Storage (GCS) based
caching soon which is only supported by sccache.

Reviewers: Keenuts, gburgessiv, dschuff, lnihlen, cmtice

Reviewed By: cmtice

Pull Request: https://github.com/llvm/llvm-project/pull/149195
2025-07-17 10:13:43 -07:00
Aiden Grossman
95639b7548
[CI] Drop CLEAR_CACHE Support in monolithic-* scripts
This patch drops support for clearing the cache with the CLEAR_CACHE
environment variable. This is an artifact of the old infrastructure as
we now do not persist the cache across builds, instead redownloading the
cache directory everytime. This makes the scripts slightly simpler as we
are no longer supporting unneeded functionality.

Reviewers: Endilll, cmtice, dschuff, Keenuts, lnihlen, gburgessiv

Reviewed By: Keenuts, cmtice

Pull Request: https://github.com/llvm/llvm-project/pull/149193
2025-07-17 07:29:27 -07:00
Aiden Grossman
498aeada7b
[CI] Generate Test Report With No Test Results
This patch makes it so that generate_test_report_github.py generates a
test report even when we don't get any test results. This otherwise
created a pretty confusing user experience on the Github side if the
build failed before any tests ran or in cases like running check-libc
where none of the tests are run through lit.

Reviewers: lnihlen, cmtice

Pull Request: https://github.com/llvm/llvm-project/pull/147871
2025-07-10 06:41:37 -07:00
Aiden Grossman
1469c339f2
[CI] Remove Style from generate_test_report_lib
This is another Buildkite relic that we can get rid of now to simplify
things a bit.

Reviewers: cmtice, DavidSpickett, lnihlen

Reviewed By: DavidSpickett

Pull Request: https://github.com/llvm/llvm-project/pull/147791
2025-07-10 06:29:18 -07:00
Aiden Grossman
2877d80155
[CI] Remove Remaining Buildkite References in generate_test_report_lib
This patch removes the buildkite_info object from
generate_test_report_lib as we no longer support buildkite so it is dead
code now. Eventually we should set up equivalent functionality on the
Github side for downloading the logs from a convenient link, but for now
clean up the code.

Reviewers: cmtice, DavidSpickett, lnihlen

Reviewed By: DavidSpickett

Pull Request: https://github.com/llvm/llvm-project/pull/147784
2025-07-10 06:28:07 -07:00
Aiden Grossman
8c32f9517a
[CI][Github] Remove MAX_PARALLEL_*_JOBS Args from Windows Runs (#147770)
This patch removes setting the MAX_PARLLEL_COMPILE_JOBS and
MAX_PARALLEL_LINK_JOBS env variables in the windows runs. These were
originally used to control the parallelism on the old infrastructure and
we set them on the new infrastructure explicitly so that we could
maintain both at the same time. Now it does not make sense to keep them
explicitly set that we do not need to explicitly control the parallelism
given the amount of RAM we have on the machines. This also adds a
maintnenace cost as evidenced by the fact that these have been incorrect
(64 instead of 32) for quite a while.
2025-07-09 10:25:09 -07:00
Aiden Grossman
6b7e1b97f4
[CI] Use Github Native Groups in monolithic-* scripts
This patch updates monolithic-linux.sh and monolithic-windows.sh to emit
expandable groups in the Github logs. The syntax this replaces
originally worked to produce the same functionality on Buildkite, but
Github uses a different syntax.

https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions#grouping-log-lines

Reviewers: cmtice, DavidSpickett, tstellar, lnihlen, Endilll

Reviewed By: Endilll, DavidSpickett

Pull Request: https://github.com/llvm/llvm-project/pull/143481
2025-07-01 16:15:27 -07:00
Amy Huang
a5baf5302a
Add modified runtimes back to runtimes_to_{test|build} (#145805)
Add libc back into the runtimes_to_test since other runtimes were
removed.
2025-06-25 16:26:18 -07:00
Aiden Grossman
99cdc26c94
[CI] Cleanup buildkite test report script
This patch removes the generate_test_report_buildkite script entrypoint
as we no longer need it now that buildkite has been sunsetted. Also
remove the calls in the monolithic-* scripts given they are adding
complexity for no value.

Also remove the generate-buildkite-pipeline-premerge script as it is
no longer needed.

Reviewers: tstellar, DavidSpickett, lnihlen, cmtice

Reviewed By: DavidSpickett

Pull Request: https://github.com/llvm/llvm-project/pull/143480
2025-06-22 17:17:12 +00:00
Aiden Grossman
214ca3161b
[CI] Test all projects when CI scripts change
This patch resolves a fixme in the compute_projects script to actually
test all the projects we can when touching something in the .ci
directory. This ensures we test things like compiler-rt before landing
changes.

Reviewers: gburgessiv, lnihlen, cmtice

Reviewed By: cmtice, gburgessiv

Pull Request: https://github.com/llvm/llvm-project/pull/144034
2025-06-22 17:12:16 +00:00
Aiden Grossman
ee414e3504
[CI] Refactor out some early exits in compute_projects
I have a habit of using early exits given it is in the LLVM coding
standards, but most of the early exits used within this script were
trivial and actually adding complexity. These are all instances where we
only perform one operation after the early exit, so removing the early
exit means less lines of code and arguably more readable code.

Reviewers: DavidSpickett, tstellar, cmtice, lnihlen

Reviewed By: DavidSpickett

Pull Request: https://github.com/llvm/llvm-project/pull/143478
2025-06-22 15:08:11 +00:00
Aiden Grossman
b7be8786af
Reapply "[CI] Migrate to runtimes build" (#143612)
This reverts commit 6f62979a5a5bcf70d65f23e0991a274e6df5955b.

The reapplies commit 80ea5f46df3e365a0a2112889bb91732167b6214.

That commit was reverted because it was causing compiler-rt test
failures due to tysan not having its dependencies set up properly within
CMake. That situation has since been rectified in
3cef099ceddccefca8e11268624397cde9e04af6.

Reviewers: lnihlen, rnk, gburgessiv, cmtice

Reviewed By: rnk, cmtice

Pull Request: https://github.com/llvm/llvm-project/pull/144033
2025-06-20 15:07:00 -07:00
George Burgess IV
6f62979a5a
Revert "[CI] Migrate to runtimes build" (#143612)
Reverts llvm/llvm-project#142696

See https://github.com/llvm/llvm-project/issues/143610 for details; I
believe this PR causes CI builders to build LLVM in a way that's been
broken for a while. To keep CI green, if this is the correct culprit,
those tests should be fixed or skipped
2025-06-10 17:57:16 -06:00
Aiden Grossman
80ea5f46df
[CI] Migrate to runtimes build
This patch migrates the premerge pipeline to use LLVM_ENABLE_RUNTIMES to
build libc and compiler-rt.

Reviewers: DavidSpickett, tstellar, cmtice, lnihlen

Reviewed By: DavidSpickett

Pull Request: https://github.com/llvm/llvm-project/pull/142696
2025-06-10 08:11:25 +00:00
Aiden Grossman
591678bebd
[CI] Explicitly compute needed runtime targets
This patch adjusts the compute_projects script to explicitly determine
what runtimes should be built and what runtimes should be tested. This
is mainly to support enabling runtimes for LLDB testing but not test
them unless we are building clang.

Reviewers: Endilll, tstellar, DavidSpickett, lnihlen

Reviewed By: DavidSpickett

Pull Request: https://github.com/llvm/llvm-project/pull/142695
2025-06-10 05:16:02 +00:00
Aiden Grossman
b93e4215ec
[CI] Use LLVM_ENABLE_RUNTIMES for runtimes builds on Linux
This patch switches us to using LLVM_ENABLE_RUNTIMES rather than using
separate runtimes builds for some reductions in CMake configuration time
and some simplification of the monolithic-linux.sh script.

Reviewers: DavidSpickett, cmtice, lnihlen, Endilll, tstellar

Reviewed By: Endilll, DavidSpickett

Pull Request: https://github.com/llvm/llvm-project/pull/142694
2025-06-08 22:06:53 +00:00
Aiden Grossman
34e5d8ef16
[CI] Remove buildkite from metrics container (#143049)
Now that buildkite has been sunsetted, remove buildkite tracking from
the metrics container as it does not do anything.
2025-06-06 12:58:57 -07:00
David Spickett
bd3c632e64
[ci] Use different emoji for Linux and Windows job titles on GitHub (#142101)
Buildkite has a bunch of custom emoji that include Linux and Windows
logos -
https://github.com/buildkite/emojis?tab=readme-ov-file#smileys--emotion.

GitHub doesn't have these so let's just use a penguin and a generic
window. 🐧 🪟

These are standard emoji so Buildkite does support them too, but there's
no motivation to change it there.

Plus, I think the metrics collection might be tied to Buildkite pipeline
name so keeping it the same saves hassle there.
2025-06-02 09:22:55 +01:00
Aiden Grossman
8083944be0 [CI] Do not fail with no JUnit XML
Currently we will fail if there are no JUnit XML files produced from
llvm-lit invocations. This can happen if the build fails and no test
suites end up getting run or if we test a project that does not use
llvm-lit, libe libc.

This fixes #142038.
2025-05-29 21:56:21 +00:00
Aiden Grossman
7d44430f66
[Github] Fix TODO after removal of continue on error (#141896)
Previously we were using continue-on-error within the workflows to
prevent sending out notifications for workflow failures. We worked
around this in the metrics container to see what was actually
failing/passing by looking at the individual steps. Now that we have
gotten rid of the continue-on-error flag, we just have to look at the
job status.
2025-05-29 08:58:51 -07:00
Aiden Grossman
62e28d4c31
[CI] Upload JUnit Test Results as Artifacts (#141905)
This enables a script to come through later and download all the test
files for further offline analysis. This is intended to enable
developing a tool that can spot flaky tests.
2025-05-29 08:58:36 -07:00
Aiden Grossman
deedc8a181
[CI][Github] Remove test naming from premerge jobs (#141527)
This patch removes the "test only please ignore" tagline from the
premerge job names. Now that we are looking to sunset the old
infrastructure pretty soon and the new infrastructure is reporting
errors, we want people to actually pay attention to the failures and
report anything erroneous.
2025-05-26 13:19:09 -07:00
Aiden Grossman
3910a2c40d [CI] Fix compute_projects.py unit tests
It seems like these tests were never run during the development of
30747cfe41f5d4f0b0083750ba9c20cfcccec117, which proceeded to break them.
This patch updates the tests to correspond to the changes introduced in
that patch.
2025-05-25 05:23:10 +00:00
Aiden Grossman
466720960b
[CI] Add link to issue tracker upon job failures (#140817)
The premerge system will fail somewhat often due to issues unrelated to
the patch being tested. This patch adds a link within the long form
outputs to the issue tracker prompting users to open an issue if they
see flakes/soemthing broken at HEAD/anything else wrong.
2025-05-22 01:12:11 -07:00
Aiden Grossman
de3e8fff20 [NFC][CI] Reformat python files
Looks like some of these were not properly formatted at some point. This
patch reformats these files so that future diffs are cleaner when
running the formatter over the whole file.
2025-05-20 21:52:33 +00:00
Aiden Grossman
32adf2c360
[Github][CI] Rename New Premerge Jobs (#138024)
This patch renames the new premerge job as suggested in
https://discourse.llvm.org/t/github-ci-notifications-and-main-branch/85868/10.
This uses more industry standard terms (like CI vs premerge checks which
might be somewhat of a LLVM CI idiom?) and makes it more generic if we
end up doing postcommit testing through Github.
2025-05-01 23:22:05 -07:00
Aiden Grossman
e4feb2d5ca
[CI] Hash pin CI python deps (#137489)
The CI scripts install some python dependencies primarily for testing
this patch moves these over to a single requirements file that also hash
pins everything using pip-compile to conform to best security and
reproducibility practices.
2025-04-27 08:21:20 -07:00
Matheus Izvekov
1c4ff5128a
[ci] add dependencies for lldb python binding tests (#136158) 2025-04-19 03:50:30 -03:00
Matheus Izvekov
2ce97fd43c
[ci] upload any generated clang reproducers as artifacts (#136157)
Make sure any generated clang reproducers end up as artifacts.
2025-04-18 19:47:06 -03:00