577 Commits

Author SHA1 Message Date
Mark de Wever
3b1dafd427
[libc++][CI] Pin the XCode version. (#135412)
This version is the current version, to avoid unplanned automatic
updates in the future pin this version.
2025-04-14 18:57:53 +02:00
Aiden Grossman
97bc9137e5
[Github][CI] Upload artifacts directory for premerge workflow
The premerge pipeline currently creates an artifacts directory with some
statistics that gets uploaded on the buildkite side for later
inspection. This patch adds support for this on the Github side by using
the upload artifacts action.

Reviewers: Keenuts, lnihlen, mizvekov, tstellar, Endilll

Reviewed By: mizvekov

Pull Request: https://github.com/llvm/llvm-project/pull/135538
2025-04-14 09:37:47 +02:00
Aiden Grossman
339f58de16 [Github] Add llvm-symbolizer to CI container
This is needed for symbolizing some test failures. It is under 8MB, so there is
very little cost to adding it.
2025-04-12 05:22:13 +00:00
Aiden Grossman
ed4c397908
[Github] Bump workflows depending on CI container to ubuntu 24.04 (#133626)
This patch bumps workflows depending upon the Linux CI container to
ubuntu 24.04. The 22.04 container is no longer being built as it was
recently bumped to 24.04, so this patch moves all of these workflows
over to the new container to keep them updated and ensure they are using
an actually maintained version of the container image.
2025-04-10 13:13:50 -07:00
Farzon Lotfi
16c84c4475
[DirectX] Add target builtins (#134439)
- fixes #132303
- Moves dot2add from a language builtin to a target builtin.
-  Sets the scaffolding for Sema checks for DX builtins
-  Setup DirectX backend as able to have target builtins
- Adds a DX TargetBuiltins emitter in
`clang/lib/CodeGen/TargetBuiltins/DirectX.cpp`
2025-04-07 12:06:57 -04:00
Louis Dionne
b4f7a2ab57
[libc++] Bump OS version for macOS backdeployment CI jobs (#131883)
In 0547e573c555, I introduced backdeployment testing on macOS using
Github-provided builders. This was done by basically building libc++ on
a slightly older macOS (like macOS 13) and then running against the
system library on that machine. However, that created a dependency that
libc++ must keep working on macOS 13, which doesn't support the
latest-released Xcode.

This patch solves that problem by moving the deployment testing to a
newer version of macOS which supports the latest-released version of
Xcode.

Sadly, that also reduces the backdeployment coverage we have since we're
not actually testing on older OSes, but is necessary to satisfy the
documented libc++ support policy. In the future, we could improve the
situation by providing a Lit configuration that allows compiling (but
not running) all the tests, building the tests on a supported macOS, and
then shipping those tests on an older backdeployment target in order to
run them against the system library. Since that requires significant
engineering, this isn't done at this time.
2025-04-05 20:53:18 +02:00
Aiden Grossman
44923d8631 [Github] Bump Github Runner Version in Agent Containers
The Github runner version got bumped recently and it would be good to keep
this up to date. Also debugging an issue where Github ARC is failing to
create new pods and trying to see if it might be related to outdated
versions.
2025-04-05 06:46:16 +00:00
Tom Stellard
7793bae97d
[workflows] Add missing -y option to apt-get for abi tests (#133337) 2025-03-31 15:30:05 -07:00
Aiden Grossman
34d858635f
[CI] Move CI over to new project computation script
This patch migrates the CI over to the new compute_projects.py script
for calculating what projects need to be tested based on a change to
LLVM.

Reviewers: lnihlen, ldionne, tstellar, Endilll, joker-eph, Keenuts

Reviewed By: Keenuts, tstellar

Pull Request: https://github.com/llvm/llvm-project/pull/132642
2025-03-28 22:25:52 -07:00
Aiden Grossman
2898c3e0bb
[Github] Simplify Getting Changed Files in Code Formatting Workflow (#133023)
This patch changes getting changed files in the pr code format job to
just checking out the previous two commits (the merge commit and its
porent, the current commit latest in main), which allows us to just diff
the merge commit. This means we do not have to checkout the ref through
the merge base, which should save approximately a minute per job (or
much more in some cases where the PR is particularly out of date).
2025-03-28 21:45:07 -07:00
Tom Stellard
a10a913402
workflows: Add missing apt-get update to abi tests (#133264) 2025-03-27 16:01:35 -07:00
Aiden Grossman
18172e461c
[Github] Bump CI container to ubuntu 24.04
This helps keep things up to date, and should not cause any issues given we do
not need to care about binary compatibility for things built in the CI
container. This patch also changes the name of the container which allows
incrementally moving jobs over after this lands.

Reviewers: tstellar

Reviewed By: tstellar

Pull Request: https://github.com/llvm/llvm-project/pull/132568
2025-03-27 12:16:45 -07:00
Aiden Grossman
5cb3052ccc
[Github] Bump CI container to LLVM 20.1.1
This patch bumps the CI container to the latest LLVM Release and gets rid of
the patch that we were carrying that is in 20.1.1.

Reviewers: tstellar

Reviewed By: tstellar

Pull Request: https://github.com/llvm/llvm-project/pull/132567
2025-03-27 12:15:23 -07:00
Mark de Wever
82c078c54d
[libc++] Remove official Clang 18 support. (#130142)
Since Clang 20 has been release we no longer support Clang 18 per our
policy.

Note the Clang 18 workarounds will be removed in a follow-up patch.
2025-03-27 18:00:46 +01:00
Farzon Lotfi
59d06071e9
[NFC][HLSL] Move emitter out of AMDGPU.cpp (#133251)
- Move all HLSL code out of AMDGPU.cpp to CGHLSLBuiltins.cpp
- Fixes accidental reorganization of HLSL code into AMDGPU caused by
(https://github.com/llvm/llvm-project/pull/132252,
https://github.com/llvm/llvm-project/commit/7f920e2e5f70b)
2025-03-27 11:47:14 -04:00
George Burgess IV
78d7dd297f
[github] remove more caches after downloading things (#133129)
This is generally good practice if the caches won't be reused (though
arguably pedantic for the `stage1-toolchain` stage).

`docker history` on comparable images showed that this saves a few
hundred MB on stage1, and ~60MB on the `apt-get` layer of
`ci-container-agent`.
2025-03-26 16:38:43 -07:00
Aiden Grossman
2d14797f40
[Github] Simplify checkout in docs test workflow (#132975)
This makes things quite a bit simpler and also gets rid of some API
calls. We weren't hitting any API limits, but getting rid of them leaves
more quota for other things should we ever need it. This just diffs the
merge commit in the pull request workflows, which gives the diff for the
PR.
2025-03-26 12:23:17 -07:00
Aiden Grossman
bf5648a3be
[Github] Bump actions script version to v7 (#131471)
This patch bumps the actions script version in the issue-write workflow
to v7. This was done before but rolled back due to errors as there were
breaking changes in v5
(https://github.com/actions/github-script#breaking-changes-in-v5). This
was reverted in f984b47.

This patch makes the necessary changes to prevent job failures.

Fixes #130211.
2025-03-21 12:35:04 -07:00
Aiden Grossman
9f919661dd
[Github] Bump most actions to ubuntu 24.04 (#131760)
This patch bumps most of the workflows to ubuntu 24.04, with the
exception of worklfows that depend on the CI container, which will need
to be updated separately before we are then able to use it for the other
workflows.
2025-03-21 11:31:50 -07:00
Aiden Grossman
312051591c
[Github] Fix scorecard action (#131472)
This patch fixes the scorecard action. It is currently failing with an
error due to the upload-artifact action being too far out of date.


https://github.com/llvm/llvm-project/actions/runs/13865016326/job/38802095257
is an example of a job failure.

This patch also bumps the other actions versions while we are at it.
2025-03-21 11:26:25 -07:00
Louis Dionne
382b707e52
[libc++] Add coverage for C++17 and Clang Modules with LSV (#131815)
In recent versions of Clang, using -std=c++20 (and later) implies LSV
when compiling with modules. This change resulted in making our LSV job
redundant with the regular modules job, which uses the latest Standard.
This patch increases the coverage of our CI without increasing its cost
by pinning the LSV job to use C++17, which normally doesn't use LSV. A
related question is whether we should add coverage for non-LSV builds
using Clang modules.
2025-03-20 13:50:59 -04:00
Mark de Wever
566916131e
[libc++][CI] Use latest Docker image. (#130497)
This image was updated in #130433.
2025-03-19 18:16:46 +01:00
Aiden Grossman
6616acd80c [Github] Change to step-security fork of changed actions
The tj-actions/changed-files repo has been taken down to the security
incident
(https://www.stepsecurity.io/blog/harden-runner-detection-tj-actions-changed-files-action-is-compromised).

This patch moves these jobs over step-security's fork, which has been
loosely audited and has had the malicious commits removed. This is
mainly intended as a stop-gap to get these actions running again while
we figure out the best path forward.
2025-03-15 20:56:29 +00:00
Aiden Grossman
df7927626b [Github] Add stefanp-synopsys to release uploaders
It seems stefanp-ibm got renamed to sefanp-synopsys. Renaming in the file so
that the release asset audit does not keep flagging this binary. All signs
point to this being the same account. The release is dated to June of 2024,
the name is close enough, and the new account is already in the LLVM org/
has a history of contributions.

This is a stop gap for #130650.
2025-03-10 21:42:26 +00:00
Aiden Grossman
4476f7237e
[Github][libc++] Hash Pin Actions in Workflows (#129488)
This patch has pins actions in the libc Github workflows. Hash pinning
is a best practice as it ensures we are getting an exact action version,
which can help with reproducibility/reliability. It additionally
alleviates security concerns as an attacker can modify release assets,
potentially giving them access to tokens in privileged workflows.
2025-03-10 11:54:12 -07:00
Jannick Kremer
318bd45158
[libclang/python] Update maximum Python version for CI to 3.13 (#130385) 2025-03-08 10:09:04 +01:00
Aiden Grossman
f984b472c4 [Github] Revert bumping actions-script version in issue-write
This patch reverts that upgrade which was performed in
74df2032d467618a9aab085120539e306f21bcc0. This broke the workflow, presumably
due to the breaking changes introduced in v5 of this action.

This is a stop-gap for #130211.
2025-03-07 03:21:43 +00:00
Aiden Grossman
0ce4b685d2
[Github] Prefer ubuntu-24.04 over ubuntu-latest (#129936)
This patch replaces all instances of ubuntu-latest with ubuntu-24.04
(outside of the entries in libc++) based on the guidelines in the LLVM
CI best practices doc (https://llvm.org/docs/CIBestPractices.html).
2025-03-06 10:32:02 -08:00
Aiden Grossman
a17a155081
[Github][libc++] Prefer ubuntu-24.04 over ubuntu-latest (#129949)
This patch replaces all instances of ubuntu-latest with ubuntu-24.04
based on the guidelines in the LLVM CI best practices doc
(https://llvm.org/docs/CIBestPractices.html).
2025-03-06 10:31:43 -08:00
Aiden Grossman
74df2032d4
[Github] Bump old action versions (#129833)
These two actions are particularly old, and should be updated to the
latest version. Doing this in a specific commit to easily roll back if
things break and to get as much testing done as possible within the jobs
triggered as a part of these changes.
2025-03-05 09:20:24 -08:00
George Burgess IV
3ce92e1c4f
github: fix empty continuation line; remove trailing whitespace (#129535)
- Trailing whitespace shows up as red on my editor, so remove.
- Docker on my machine warns that having line continuations like:

```
  sudo \

  foo
```

is deprecated, and will become an error, so fix that up ahead of time.
2025-03-03 09:47:42 -07:00
Aiden Grossman
c9aefe10d7
[Github][libc] Hash Pin Actions in Workflows (#129487)
This patch has pins actions in the libc Github workflows. Hash pinning
is a best practice as it ensures we are getting an exact action version,
which can help with reproducibility/reliability. It additionally
alleviates security concerns as an attacker can modify release assets,
potentially giving them access to tokens in privileged workflows.
2025-03-03 08:37:39 -08:00
Aiden Grossman
705decc860
[Github] Hash Pin Actions in Most Workflows (#129486)
This patch haspins all actions in most of the LLVM Github workflows.
This is something we try to do, but no one has gone through and combed
through all of the workflows before this patch.

Notably, this patch does not bump any major versions of actions just in
case there are subtle breaking changes introduced between versions that
could impact us. Also, this patch omits the libc/libc++ workflows so
that they can be split into separate PRs for the respective subproject
maintainers to review.
2025-03-03 08:37:20 -08:00
Martin Storsjö
e6a0ee3d1d
[libc++][ci] Update the Windows toolchains to Clang 19 (#129232)
This also fixes test failures in the clang-cl build configs that started
a couple days ago. It seems like the failures were triggered by an update
to the base image on the Github provided runners.

There were failures in test/libcxx/system_reserved_names.gen.py, due to
an issue in an Clang intrinsics header (avx512fp16intrin.h); this issue
was observed and fixed for Clang 19 in 6f04f46927c. The test does
    #define A SYSTEM_RESERVED_NAME
which clashes with a parameter with the name `A` in that header.

By upgrading the toolchain to Clang 19, we get fixed version of this
intrinsics header.

Also update the llvm-mingw toolchains to a version with Clang 19.1.7.
2025-02-28 09:56:16 -05:00
Tom Stellard
148111fdcf
[CMake][Release] Enable bolt optimization for clang on Linux (#128090)
Also stop buiding the bolt project on other platforms since bolt only
supports ELF.
2025-02-25 07:33:42 -08:00
Aiden Grossman
b9e25f65a8
[Github][CI] Name Premerge Jobs Experimental (#128227)
As discussed on Discourse
(https://discourse.llvm.org/t/googles-plan-for-the-llvm-presubmit-infrastructure/78940/8),
this patch renames the premerge jobs to include experimental in them to
hopefully better signal that these are still a prototype. This patch
does not mark the MacOS job as experimental as that is being used in
production on the release branch.
2025-02-22 10:43:53 -08:00
Louis Dionne
e11ca593a2
[libc++] Shuffle the order of pre-commit CI jobs a bit (#128008)
I've recently noticed that our CI is bottlenecked around platforms on
which we don't have a lot of capacity like macOS (mostly) and Windows.
To try to alleviate that, this patch moves the macOS builds and the
Windows builds further down the pipeline so that they will get triggered
less often (if an earlier job fails).
2025-02-21 07:58:53 -05:00
Aiden Grossman
6e7da07c73
[Github][CI] Enable New Premerge on PRs (#127894)
This patch gets rid of the file restriction for running the new premerge
Github workflow on PRs. This will cause the jobs to be run on all the
PRs. Currently the jobs will succeed regardless of build/test failure
results. This will let us test the new infra hopefully without too much
disruption before eventually letting jobs fail when builds/tests fail
and deprecating the existing premerge system.

This is part of the launch plan as outlined in

https://discourse.llvm.org/t/googles-plan-for-the-llvm-presubmit-infrastructure/78940.
2025-02-20 10:32:40 -08:00
Tom Stellard
3e5ae5777d
workflows/release-binaries: Disable Flang on x86_64 macOS (#127216)
The flang build was taking 2-3 hours and causing the entire job to
timeout, so we need to disable it.
2025-02-19 19:16:30 -08:00
Gábor Horváth
5450954a06
Include test folder in the Clang Static Analyzer team mentions (#127810)
See
https://discourse.llvm.org/t/taking-ownership-of-clang-test-analysis/84689
2025-02-19 17:45:05 +00:00
Mark de Wever
b22fc43551
[libc++] Updates the compilers used post LLVM-20 branching. (#126564)
Once LLVM 20 is released the clang-18 will no longer be supported.
2025-02-18 19:26:44 +01:00
Aiden Grossman
50b1763d9d [Github][CI] Fix Typo in MacOS Job Name
This patch changes the name of the MacOS premerge job from
permerge-checks-macos to (the presumably correct) premerge-checks-macos.
2025-02-14 22:53:57 +00:00
Tom Stellard
d595d5a770
workflows/release-binaries: Fix macos-14 build (#127157)
This was broken when pgo was enabled by
0572580dd040a81dc69b798e202550d51d17204a.
2025-02-14 07:28:44 -08:00
Aiden Grossman
161f64a4c1
[Github][CI] Hashpin actions dependencies (#127011)
This patch has pins several actions dependencies in the premerge
workflow and the Windows/Linux container build workflows to help improve
security in the unlikely event that someone tries to pull off a supply
chain security attack by modifying release asserts for these actions.
2025-02-13 12:16:42 -08:00
David Spickett
873aa29945
[GitHub] Make release audit more strict for LLVM 19 and beyond (#125841)
Before 19, we had releases from release managers, the bot, and community
members. 19 started to restrict this, with only select community members
uploading releases. The lists of users are written out each time to make
modifying this easier.

If we cannot parse the release number, I've made it raise an issue
saying so. Since this may also be a sign of a malicious action.
2025-02-13 12:59:47 +00:00
Tom Stellard
a684e0ea57
workflows/release-binaries-all: Add missing secret input (#126921)
Since d194c6b9a7fdda7a61abcd6bfe39ab465bf0cc87 this workflow was missing
the secret input which was causing it to fail.
2025-02-12 10:01:46 -08:00
Aaron Siddhartha Mondal
42538ca3a0
[GitHub] Add aaronmondal to Bazel codeowners (#126760) 2025-02-11 09:24:05 -08:00
Aiden Grossman
f101899ae8
[libc++][Github] Remove workflow-scoped write permissions (#126447)
This patch removes the workflow-scoped package write permissions in the
libcxx-build-containers workflow. The relevant permissions are already
present in the job, so this raises the potential for new jobs being
added to the workflow that do not need the permissions but having them
anyways. Not having workflow-scoped write permissions is security best
practice.

Fixes #126230.
2025-02-10 10:54:46 -08:00
Petr Hosek
170cdadf7d
[libc] Exercise all CMake build types in GitHub Action workflows (#126315)
We want to test libc in all build configurations: Debug, Release and
MinSizeRel which correspond to -O0, -O3 and -Os optimization flags.
2025-02-07 14:50:52 -08:00
Tom Stellard
6e59888631
workflows/premerge: Move concurrency definition to workflow level (#126308)
Prior workflow runs were not being cancelled when the pull request was
closed, and I think this was why. Also, there is no advantage to having
the definitions at the job level.
2025-02-07 13:09:58 -08:00