Commit Graph

665 Commits

Author SHA1 Message Date
David Spickett
e8b7183d86 [llvm][release] Add links to commonly used release packages (#147719)
This adds download links to the GitHub release pages for common
platforms. The automatically built packages' links are automatically
revealed once the builds are complete. For packages built by hand,
hidden links are included in the text for release uploaders to reveal
later.

The approach taken:
* "LLVM x.y.z Release" becomes the title for this links section.
* Automatically built packages are commented out with special markers so
we can find them to uncomment them later.
* There is placeholder text for the time between release creation and
release tasks finishing.
* Hand built packages have release links but these will need to be
un-commented by release uploaders.
* I have used vendor names for the architectures, that casual users
would recognise.
* Their signature file is linked as well. I expect most will ignore this
but better to show it to remind people it exists.
* I called it "signature" as a generic term to cover the .jsonl and .sig
files. Instructions to use these were added to the text in a previous
change.
2025-07-29 12:35:15 +01:00
Konstantin Varlamov
3eee9fc2c4 [libc++][hardening] Introduce assertion semantics. (#149459)
Assertion semantics closely mimic C++26 Contracts evaluation semantics.
This brings our implementation closer in line with C++26 Library Hardening
(one particular benefit is that using the `observe` semantic makes adopting
hardening easier for projects).
2025-07-29 00:19:15 -07:00
Maksim Panchenko
7c14c5380a [github/CODEOWNERS] Add yozhu as BOLT reviewer 2025-07-28 20:41:14 -07:00
Aiden Grossman
88389cce53 [CI][Github] Bump CI Container Runner to v2.327.1
This came out a couple days ago. Upgrading to be proactive.
2025-07-28 19:58:20 +00:00
Aiden Grossman
b33f9f64c7 [libcxx] Enable installing new runner binary on existing container
This patch does some refactoring to enable installing a new GHA runner binary
into an existing libcxx image. We achieve this by pushing the base image to the
registry and enabling control over the base image used for building the actions
image. This will always build and push both images even if an existing image is
being used for the actions image, but this should not impact anything as the
SHAs are pinned everywhere and space/build time is not a large concern.

Reviewers: ldionne, EricWF, #reviewers-libcxx

Reviewed By: ldionne

Pull Request: https://github.com/llvm/llvm-project/pull/148073
2025-07-28 12:35:40 -07:00
Krishna Pandey
6a45697fa6 [CI] Downgrade to clang-20 for libc fullbuild (#150246)
To be reverted when llvm-21 issues are resolved with the precommit CIs.
Signed-off-by: Krishna Pandey <kpandey81930@gmail.com>
2025-07-28 11:49:19 -04:00
Aiden Grossman
fd65b2097b [Github][libcxx] Run Container Build Workflow on Stacked PRs (#150683)
Currently the container build workflow does not run on stacked PRs that
do not have a branch target of main because of how the workflow is
configured. This makes the workflow better confirm to the LLVM CI best
practices around Github workflows:


https://llvm.org/docs/CIBestPractices.html#ensuring-workflows-run-on-the-correct-events
2025-07-25 12:47:31 -07:00
Maksim Levental
ae5537e014 Update CODEOWNERS for MLIR python bindings (#150609) 2025-07-25 11:48:55 -05:00
Aiden Grossman
0f3c94a3d8 [CI] Remove ccache from Linux CI Container
This patch removes ccache from the Linux CI container. It is no longer
needed after migrating the monolithic-linux.sh script. The other two
upstream users of this container, namely the post commit static analyzer
and the llvm tests workflow both already use sccache.

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

Reviewed By: dschuff, Keenuts, cmtice

Pull Request: https://github.com/llvm/llvm-project/pull/149197
2025-07-25 08:38:13 -07:00
Aiden Grossman
965bb5d9f4 [Github] Use sparse checkout in release asset audit (#148646)
This patch makes the release asset audit script use a sparse checkout
given we only need two files. This should make the action quite a bit
more efficient as it is presumably currently bottlenecked by checking
out the entire monorepo.
2025-07-25 07:40:04 -07:00
Aiden Grossman
bcfd29418f [CI][Github] Set SCCACHE_IDLE_TIMEOUT to 0 (#150508)
This patch sets the sccache idle timeout to zero which ensures that it
will run indefinitely. Without this, sccache will sometimes stop when
several long test suites get run consequitively. This resets the
statistics which we save at the end. Ensuring the process stays running
means we have accurate statistics when we collect them at the end.
2025-07-24 15:11:24 -07: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
74505806b6 [CI][Github] Bump runner version in CI containers
v2.327.0 is the latest version. Bump the version in the containers to
keep them up to date.
2025-07-24 14:23:46 +00:00
Aiden Grossman
675d7e19a7 [CI][Github] Add Workflow to Run Python Tests in CI Folder (#148696)
This patch adds a new GHA workflow that runs pytest inside of the .ci
directory to test all of the CI infrastructure. This is to make it more
visible to new contributors that these tests exist and also to ensure
that they are passing before merge. There have been several instances
already where someone neglected to update these tests and we should have
automation to enforce this.
2025-07-24 06:27:59 -07:00
Aiden Grossman
796f551244 [CI] Enable Windows Caching Through Sccache GCS (#150114)
Same as 921287e126 but for Windows.
2025-07-22 15:53:52 -07:00
Aiden Grossman
921287e126 [CI] Enable sccache GCS on Linux premerge (#149923)
This patch enables sccache using GCS for Linux premerge.
2025-07-22 13:31:25 -07:00
Aiden Grossman
7b541c931e [Github] Build CI Containers in Stacked PRs (#149346)
Currently the pull_request event on the build CI container workflows are
restricted to main. This prevents building them on stacked PRs. This is
a bit annoying because we do not get the CI to test that everything is
working until all of the base PRs have landed and the target branch
becomes main.
2025-07-18 07:06:49 -07:00
Matt Arsenault
8813fc07f2 github: Add libclc to PR autolabeler (#149274) 2025-07-18 09:05:26 +09:00
S. VenkataKeerthy
5d78332e8a Add llvm-ir2vec.rst to pr-subscribes-mlgo (#149412) 2025-07-17 14:46:24 -07:00
S. VenkataKeerthy
64c7e7efeb Add tools/llvm-ir2vec to pr-subscribes-mlgo (#149405) 2025-07-17 14:03:21 -07: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
fcb7ed69d0 [CI][Github] Use newer sccache version in CI container
I was having trouble with the version that ships in the ubuntu apt repository
and GCS based caching. The newer version works, so reintroduce the infra that
we had in 2c1d4b0404 to download it.

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

Reviewed By: cmtice, Keenuts

Pull Request: https://github.com/llvm/llvm-project/pull/149196
2025-07-17 10:15:11 -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
Udit Kumar Agarwal
7caa0c9a55 Revert "[CI] Make email check workflow fail when author's email is private in Github UI" (#149186)
Reverts llvm/llvm-project#148694

The workflow is failing if user's email is not listed publicly on your
GH profile. This is different from not having your email public on
Github (in Github email settings page vs. email field in Github
profile/email settings).
2025-07-16 21:02:51 +00:00
Udit Kumar Agarwal
0f0305021c [CI] Make email check workflow fail when author's email is private in Github UI (#148694)
**Problem**
Currently, the email check workflow uses `git` to see email used for the
last commit but the email address used when merging is actually governed
by GitHub settings not what's stored in `git`. Due to this, the email
check workflow passes even when the author's email is private in Github.
We saw several such cases in our fork of llvm. See
https://github.com/intel/llvm/issues/17675

**Solution**
Try to find user's email using GH's GraphQL APIs. User's email will be
null if it's hidden in the profile.

---------

Signed-off-by: Agarwal, Udit <udit.agarwal@intel.com>
2025-07-16 17:12:58 +00:00
Jannick Kremer
7a9bef0166 Revert "Move python binding tests to lit framework" (#149012)
This reverts commit f8707f994af2582f6dc58190106946efeb43bf05.
2025-07-16 05:32:08 +01:00
Henrich Lauko
e6fcd59a18 [github][CIR] Add xlauko and andykaylor as CIR reviewers (#148852) 2025-07-15 18:12:49 +02:00
Aiden Grossman
3248a6d76a [CI][Github] Switch windows to server 2022 (#148743)
This patch switches the windows testing over to server 2022 by switching
to the recently introduced runner set.
2025-07-15 08:10:47 -07:00
Jannick Kremer
ec149d5ef8 [clang][python][test] Move python binding tests to lit framework (#148802)
As discussed in PR #142353, the current testsuite of the `clang` Python
bindings has several issues:

- It `libclang.so` cannot be loaded into `python` to run the testsuite,
the whole `ninja check-all` aborts.
- The result of running the testsuite isn't report like the `lit`-based
tests, rendering them almost invisible.
- The testsuite is disabled in a non-obvious way (`RUN_PYTHON_TESTS`) in
`tests/CMakeLists.txt`, which again doesn't show up in the test results.

All these issues can be avoided by integrating the Python bindings tests
with `lit`, which is what this patch does:

- The actual test lives in `clang/test/bindings/python/bindings.sh` and
is run by `lit`.
- The current `clang/bindings/python/tests` directory (minus the
now-subperfluous `CMakeLists.txt`) is moved into the same directory.
- The check if `libclang` is loadable (originally from PR #142353) is
now handled via a new `lit` feature, `libclang-loadable`.
- The various ways to disable the tests have been turned into `XFAIL`s
as appropriate. This isn't complete and not completely tested yet.

Tested on `sparc-sun-solaris2.11`, `sparcv9-sun-solaris2.11`,
`i386-pc-solaris2.11`, `amd64-pc-solaris2.11`, `i686-pc-linux-gnu`, and
`x86_64-pc-linux-gnu`.

Co-authored-by: Rainer Orth <ro@gcc.gnu.org>
2025-07-15 12:48:24 +02:00
Nikolas Klauser
339a1f2e8f Revert "[libc++][hardening] Introduce assertion semantics" (#148822)
Reverts llvm/llvm-project#148268

It looks like this was based on #148266, which I reverted in #148787.
2025-07-15 12:43:37 +02:00
Konstantin Varlamov
7345508c6f [libc++][hardening] Introduce assertion semantics (#148268)
Assertion semantics closely mimic C++26 Contracts evaluation semantics.
This brings our implementation closer in line with C++26 Library
Hardening (one particular benefit is that using the `observe` semantic
makes adopting hardening easier for projects).
2025-07-15 02:14:30 -07:00
Aiden Grossman
968b2389ce [CI][Github] Version pin packages in windows container
I spent several hours debugging failures in the server 2022 container
today that turned out to be related to a new ninja release from a couple
weeks ago. This patch version pins all the packages so they do not
spuriously upgrade and we can control the process to waste less effort
debugging changes due to version changes.

Reviewers: cmtice, tstellar, lnihlen

Reviewed By: cmtice

Pull Request: https://github.com/llvm/llvm-project/pull/148319
2025-07-14 10:46:06 -07:00
Aiden Grossman
3e43915be6 [CI][Github] Bump Windows Container to Server 2022
This patch bumps the windows CI container to windows server 2022 from
windows server 2019. This is necessary as Github has sunsetted support
for sever 2019, so we cannot build the container through GHA without
updating. Using more recent versions is just good practice anyways.

This will not roll out immediately and we'll have to make some TF
changes to get deployed, but some additional validation first will be
good anyways.

Reviewers: lnihlen, tstellar, cmtice

Reviewed By: cmtice

Pull Request: https://github.com/llvm/llvm-project/pull/148318
2025-07-14 08:24:54 -07:00
Peter Collingbourne
be7a21622e Improve file patterns for some backends.
I noticed that one of my PRs, #147624, did not get automatically
labelled with `backend:RISC-V` when it touched a test under
`llvm/test/CodeGen/RISCV`. This seems to be because the pattern only
looks for files named `*RISCV*` or `*riscv* and not necessarily files
in a directory named like that. To fix that, let's make RISC-V use
a more accepting pattern, similar to AMDGPU, and do the same for two
other backends.

Reviewers: tstellar, arsenm

Reviewed By: arsenm

Pull Request: https://github.com/llvm/llvm-project/pull/147633
2025-07-11 18:05:39 -07:00
Aiden Grossman
a386d0e13f [Github] Bump CI Container to 20.1.8 (#148104)
This patch bumps the LLVM toolchain version within the CI container to
20.1.8.
2025-07-11 07:25:46 -07:00
Owen Pan
b01ef20c5b [GitHub][workflows] Use latest clang-format version 20.1.8 (#148099) 2025-07-10 22:26:33 -07:00
Matheus Izvekov
8a7c973f64 [ci] premerge: upload artifacts even on failure (#147999)
This makes sure we upload the artifacts even if the previous step
failed.

This is helpful because we wish to upload crash reproducers, which the
scritps are already prepared to do.

Example:
https://github.com/llvm/llvm-project/actions/runs/16180778101/job/45676677544?pr=147835
2025-07-10 15:10:12 -03:00
cmtice
582cfb142c [libc++] Switch over to the LLVM-wide premerge test runners. (#147794)
Update the premerge testing system to use the LLVM-wide premerge
infrastructure. Also remove libcxx-restart-preempted-jobs.yaml, as this
should no longer be needed.
2025-07-10 10:34:01 -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
cb7b0693c6 [Github][CI] Bump Github Runner Version in CI Container to v2.326.0 (#147393)
This is the latest runner version. Looks like it contains some minor
fixes/dependency bumps.
2025-07-07 14:38:24 -07:00
Amy Huang
26a766ae63 Make sure all matrix options are run in libc premerge testing (#146162)
https://github.com/llvm/llvm-project/pull/126315 changes the premerge
testing to build in Debug, Release, and MinSizeRel configs, as opposed
to only MinSizeRel, but for some reason the matrix is not returning all
options now. Fix so that it actually builds the intended configs.

Per discussion in
[146161](https://github.com/llvm/llvm-project/issues/146161), only test
all three configs on Linux x86_64. Other OS's and configurations will
build in Debug mode only.

Also fix a cmake variable and remove outdated comments.

Bug: https://github.com/llvm/llvm-project/issues/146161
2025-07-07 10:19:10 -07:00
Jannick Kremer
d66254e7fe Revert " Move python binding tests to lit framework (#146844)" (#146931)
This reverts commit 2532bde038.
2025-07-03 19:34:19 +02:00
Jannick Kremer
2532bde038 [clang][python][test] Move python binding tests to lit framework (#146844)
As discussed in PR #142353, the current testsuite of the `clang` Python
bindings has several issues:

- It `libclang.so` cannot be loaded into `python` to run the testsuite,
the whole `ninja check-all` aborts.
- The result of running the testsuite isn't report like the `lit`-based
tests, rendering them almost invisible.
- The testsuite is disabled in a non-obvious way (`RUN_PYTHON_TESTS`) in
`tests/CMakeLists.txt`, which again doesn't show up in the test results.

All these issues can be avoided by integrating the Python bindings tests
with `lit`, which is what this patch does:

- The actual test lives in `clang/test/bindings/python/bindings.sh` and
is run by `lit`.
- The current `clang/bindings/python/tests` directory (minus the
now-subperfluous `CMakeLists.txt`) is moved into the same directory.
- The check if `libclang` is loadable (originally from PR #142353) is
now handled via a new `lit` feature, `libclang-loadable`.
- The various ways to disable the tests have been turned into `XFAIL`s
as appropriate. This isn't complete and not completely tested yet.

Tested on `sparc-sun-solaris2.11`, `sparcv9-sun-solaris2.11`,
`i386-pc-solaris2.11`, `amd64-pc-solaris2.11`, `i686-pc-linux-gnu`, and
`x86_64-pc-linux-gnu`.

Co-authored-by: Rainer Orth <ro@gcc.gnu.org>
2025-07-03 13:56:54 +02:00
Jannick Kremer
c863e0ebc2 Revert "Move python binding tests to lit framework (#146486)" (#146789)
This reverts commit a75587d271.
2025-07-02 23:41:01 +02:00
Eric
d78036f06e Only restart failed libc++ jobs, not cancelled ones. (#146397)
Despite the error message for preempted jobs containing the words
"cancelled", these are considered workflow "failures" by github.

This is important, because if we fail to distinguish between "failed"
and "cancelled" jobs, the restarter will fight to restart jobs a user
intentionally cancelled (either by pressing the "cancel" button, or by
pushing an update to a PR).

This reverts commit 3ea7fc7339. This also
reverts earlier attempts to solve this problem by matching the messages
to detect manual cancellations.

This change also removes ldionne's test workflow, as its hard to
correctly keep in sync.

This change does not attempt to address the maintainability or
testability of this script, which continues to be an issue. If asked to
address these issues, my plan is to write the script in python (which
most people are more familar with), and turn this action into a "docker
action" using a container with the python action and dependencies built
into it. Let me know if that's a direction we're interested in heading.
2025-07-02 10:04:37 -04:00
Jannick Kremer
a75587d271 [clang][python][test] Move python binding tests to lit framework (#146486)
As discussed in PR #142353, the current testsuite of the `clang` Python
bindings has several issues:

- It `libclang.so` cannot be loaded into `python` to run the testsuite,
the whole `ninja check-all` aborts.
- The result of running the testsuite isn't report like the `lit`-based
tests, rendering them almost invisible.
- The testsuite is disabled in a non-obvious way (`RUN_PYTHON_TESTS`) in
`tests/CMakeLists.txt`, which again doesn't show up in the test results.

All these issues can be avoided by integrating the Python bindings tests
with `lit`, which is what this patch does:

- The actual test lives in `clang/test/bindings/python/bindings.sh` and
is run by `lit`.
- The current `clang/bindings/python/tests` directory (minus the
now-subperfluous `CMakeLists.txt`) is moved into the same directory.
- The check if `libclang` is loadable (originally from PR #142353) is
now handled via a new `lit` feature, `libclang-loadable`.
- The various ways to disable the tests have been turned into `XFAIL`s
as appropriate. This isn't complete and not completely tested yet.

Tested on `sparc-sun-solaris2.11`, `sparcv9-sun-solaris2.11`,
`i386-pc-solaris2.11`, `amd64-pc-solaris2.11`, `i686-pc-linux-gnu`, and
`x86_64-pc-linux-gnu`.

Co-authored-by: Rainer Orth <ro@gcc.gnu.org>
2025-07-02 10:11:48 +02:00
Mircea Trofin
425359a83d [experimental] Ask copilot to check perf profile degradation (#146271)
We can optionally add copilot as a reviewer. As per
[documentation](https://docs.github.com/en/copilot/how-tos/agents/copilot-code-review/using-copilot-code-review#customizing-copilots-reviews-with-custom-instructions),
we can customize the review. This PR asks it to pay attention to the
kind of code that might corrupt performance data, or, in the case of
sample profiling, result in poor profiles by dropping debug info.
2025-06-30 08:09:28 -07:00
Eric Fiselier
3ea7fc7339 attempt to calm down restarter job 2025-06-28 17:19:24 -04:00
Eric Fiselier
94c1506548 Further restrict the restarters ability to restart manually canceled jobs 2025-06-28 13:05:51 -04:00
Eric Fiselier
169b4bea87 Attempt to fix over-keen restarter.
The restarter will restart jobs that were canceled by a newer change,
causing the new and old change to fight it out.

This change attempts to address this by treating the "canceled" message
as an error.
2025-06-28 12:59:33 -04:00