Commit Graph

363 Commits

Author SHA1 Message Date
Adam Yang
90eca3f3f4 [Github] Explicitly requesting Ubuntu 22.04 for SPIRV test (#122395)
For the same reason as
[#122221](https://github.com/llvm/llvm-project/pull/122221), this fixes
build failure from missing python3.
2025-01-10 19:32:54 -08:00
Chris B
218f15cd1e Add pre-merge workflow for HLSL testing (#122184)
This adds a workflow for running HLSL tests on PRs that modify HLSL and
DirectX code.

The tests enabled here are the LLVM & Clang tests and the Offload
execution tests: https://github.com/llvm-beanz/offload-test-suite/
2025-01-09 14:10:44 -06:00
Aiden Grossman
a759176795 [Github] Fix LLVM Project Tests Workflow on Linux (#122221)
This patch fixes the LLVM project tests workflow on Linux. Two changes
were needed. Firstly, some commands need to be performed with sudo now
that the container executes as a non-root user. Second, we needed to
change from `ubuntu-latest` to `ubuntu-22.04` as `ubuntu-latest` not
defaults to `ubuntu-24.04` which causes `setup-python` to install a
python executable linked against a newer version of glibc that is not
found on ubuntu 22.04, which causes failures when CMake cannot execute
the python interpreter that it finds.
2025-01-09 07:58:38 -08:00
Aiden Grossman
459d413b74 [CI][Github] Do not fail premerge job
The postcommit job is currently sending emails on failures. A lot of these
emails are useless noise as there are still some problems with the new
infrastructure that need to be fixed before the results are reliable.
2025-01-09 05:05:34 +00:00
Aiden Grossman
929b90be30 [Github] Add sccache to CI container (#122063)
This patch adds sccache to the CI container so that the
llvm-project-tests workflow does not fail due to missing sccache.
2025-01-08 20:57:33 -08:00
Aiden Grossman
91ab10e8d6 [Github] Add sudo to CI container (#122036)
This patch adds sudo to the CI container and also adds the gha user as a
member of the sudo group along with making any member of the sudo group
able to run commands as root without a password. This is primarily
intended to enable installing new software through apt-get without
having to rebuild the container.
2025-01-08 17:21:40 -08:00
Tom Stellard
2359635457 workflows/commit-access-review: Exclude users who have recently requested access (#119102)
Now that we are accepting commit access requests via GitHub issues, we
can keep track of who has recently requested access.
2025-01-07 15:01:49 -08:00
Louis Dionne
858f025a00 [ci] Bump the version of clang-format used in the CI (#119915)
The version of clang-format we use in the CI to format all PRs is a bit
outdated, leading to some confusion when the CI job produces different
output from what people have locally.
2025-01-07 16:40:22 -05:00
Tom Stellard
dfa4312c9b workflows/release-binaries: Replace some workflow interpolations with env vars (#120860)
This is recommended by the GitHub Actions security hardening guide:
https://docs.github.com/en/actions/security-for-github-actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable
2025-01-03 15:08:40 -08:00
Tom Stellard
06cf4f9704 workflows/new-issues: Use an llvmbot token to add labels (#120840)
There is a separate job that mentions teams based on the label added,
and this job won't run if we use the default github token.
2025-01-03 15:06:35 -08:00
Tom Stellard
1b5deaeb2a workflows/build-ci-container: Make sure to only test local containers (#120827)
The container test is run before we create the :latest tag, so we should
not try testing this, otherwise it will pull the :latest tag from the
github registry, and won't test the container we just built.
2025-01-03 15:02:16 -08:00
Nikolas Klauser
b9a2658a3e [libc++][C++03] Use __cxx03/ headers in C++03 mode (#109002)
This patch implements the forwarding to frozen C++03 headers as
discussed in
https://discourse.llvm.org/t/rfc-freezing-c-03-headers-in-libc. In the
RFC, we initially proposed selecting the right headers from the Clang
driver, however consensus seemed to steer towards handling this in the
library itself. This patch implements that direction.

At a high level, the changes basically amount to making each public
header look like this:

```
// inside <vector>
#ifdef _LIBCPP_CXX03_LANG
#  include <__cxx03/vector>
#else
  // normal <vector> content
#endif
```

In most cases, public headers are simple umbrella headers so there isn't
much code in the #else branch. In other cases, the #else branch contains
the actual implementation of the header.
2024-12-21 13:01:48 +01:00
Louis Dionne
d56edc14d8 [libc++] Bump the Docker image used in the CI (#120248)
This switches to using a slightly newer CMake version in our CI.
2024-12-19 11:12:05 -05:00
Aiden Grossman
8a62104f64 [Github] Use hashed dependencies in docs job (#120319)
This patch forces the docs test build job to use the hashed dpendencies
file rather than the normal requirements.txt. This ensures that we get
the exact transitive closure specified rather than whatever the
dependency solver feels like it should use in the CI job.
2024-12-17 14:46:13 -08:00
Aiden Grossman
4a7673ddf2 [Github] Fix premerge concurrency cancellation
This should actually fix the problem as I validated that github.sha returns an
actual value by running a workflow in a test repo. I'm not sure why the
existing value doesn't work, but it returns nothing.
2024-12-17 06:49:35 +00:00
Aiden Grossman
f0878995c2 [Github] Fix concurrency groups for premerge
According to https://docs.github.com/en/rest/using-the-rest-api/github-event-types?apiVersion=2022-11-28,
When we look at the push event payload, github.event.push.head is a string
containing the SHA. This is currently causing new commits on main to cancel
the premerge pipeline of older commits.
2024-12-17 01:10:46 +00:00
Aiden Grossman
a8456c9a2f [Github] Enable new premerge workflow postcommit
This patch enables the new premerge workflow postcommit so that we can start
testing it at a reasonable scale with minimal disruption.
2024-12-16 23:11:54 +00:00
Aiden Grossman
484a2819de [CI][Github] Add linux premerge workflow (#119635)
This patch adds a Github Actions workflow for Linux premerge. This
currently just calls into the existing CI scripts as a starting point.
2024-12-16 13:30:51 -08:00
Aiden Grossman
b86a22aa39 [Github] Default to non-root user in linux CI container (#119987)
This patch sets the default user in the linux CI container to a non-root
user, which enables properly testing a couple of features, particularly
in libcxx.
2024-12-16 13:22:34 -08:00
Aiden Grossman
1751914a52 [Github] Add some additional system packages (#119988)
This patch adds some additional system packages to the CI container.
These are necessary for use in the new premerge workflows. The size
increase is not super small, but should be manageable with the size
increase being about 100MB.
2024-12-16 12:30:01 -08:00
Aiden Grossman
af20aff35e [Github] Fix windows container push (#119916)
The windows container push was not tested in the pull request and had a
couple of typos that prevented it from functioning. This patch fixes
that so we can actually push the container to GHCR.
2024-12-13 19:00:03 -08:00
Tom Stellard
22266bc958 workflows/build-ci-container: Fix typos in variables (#119943)
This was preventing the containers from being pushed to the registry.
2024-12-13 18:59:37 -08:00
Aiden Grossman
a44915a8e5 [Github] Add a windows CI container (#118206)
This patch adds a windows CI container mostly based off of the existing
container used for Buildkite
(a687e33c37/containers/buildkite-windows/Dockerfile (L1)).
This is intended to be a starting point as we transition to Github
Actions with the eventual plan being to build a custom windows toolchain
similar to what we do on Linux.
2024-12-13 10:00:57 -08:00
Aiden Grossman
5747ad4392 [Github] Test docs action on workflow changes (#119627)
This patch makes the check docs build workflow run testing on all of the
docs builds when the workflow is changed. This is intended to catch
issues like those that were not caught premerge when adding in the
functionality to download the built docs.
2024-12-13 09:50:25 -08:00
Aiden Grossman
939c94bbb4 [Github] Bump CI container to LLVM 19.1.5 (#119809)
Bump the CI container version to the latest release.
2024-12-13 09:03:36 -08:00
Schrodinger ZHU Yifan
24162bdaf7 [libc][workflows] fix pre-commit fullbuild dependency problem (#119441)
- fix the issue where `linux-headers-generic` cannot be installed
2024-12-10 15:08:38 -05:00
Louis Dionne
7ea1fe7732 Revert "[libc++] Try handling spurious cancellation in the mainline CI restarter"
This reverts commit ecbf64d6dc, since that seems to cause the CI to
restart-loop instead of doing what it should.
2024-12-10 10:29:35 -05:00
Louis Dionne
ecbf64d6dc [libc++] Try handling spurious cancellation in the mainline CI restarter
We've been having issues with cancelled CI jobs due to Docker-in-Docker
failures (spurious). I tried addressing that by adding a new flavor of
the restarter action, but that clearly hasn't worked out since we see
a lot of these spurious failures.

This PR is an attempt to fix this by changing the mainline CI restarter
used by libc++, not just the workflow job I added for testing. I have to
check this in to test it because this workflow uses the version that's
on the main branch.
2024-12-10 10:02:41 -05:00
Schrodinger ZHU Yifan
bd231da1d1 [libc][workflow] address permission concern and add more comments (#119320)
This patch limits the permission of pre-commit libc pipelines. It also
adds detailed comments to help future modifications.
2024-12-10 09:37:27 -05:00
Tom Stellard
df4c5d5b58 workflows: Rewrite build-ci-container to work on larger runners (#117353)
Also switch them over to the new depot runners.
2024-12-10 06:31:41 -08:00
Schrodinger ZHU Yifan
f15cc6fe2f [libc] add multi-platform pre-commit github actions (#119104)
We do not have CI coverage for Windows/MacOS and we regularly run into
problem where changes break post-commit fullbuild which is not tested in
pre-commit builds. This PR utilizes the github action to address such
issues.
2024-12-09 16:04:07 -05:00
Louis Dionne
a5e87c6d8d [libc++] Try fixing the preemption detection regex 2024-12-09 09:12:14 -05:00
Tom Stellard
0d5ae3632d workflows/commit-access-review: Use Python APIs for graphql queries (#108903) 2024-12-06 18:34:03 -08:00
Tom Stellard
c49d809f2f workflows/commit-access-review: Update label name (#118903)
We switched to using a new label name for tracking commit access
requests.
2024-12-06 18:16:30 -08:00
Louis Dionne
8ab2730c0a [libc++] Rename test job for restarting preempted jobs 2024-12-05 13:14:07 -05:00
Louis Dionne
842d563151 [libc++][CI] Also restart failed jobs when they fail for a spurious reason
Since we moved to a Docker-in-Docker setup, CI jobs sometimes fail due
to the Docker VM dying with 'context cancelled' errors. This is currently
not recognized as a spurious failure, which leads to the job not being
automatically restarted. This patch fixes that.

This commit only adds a test job with the new logic since this workflow
triggers on workflow_run, which means that the changes need to be on
`main` before they can be tested. Once this is tested to work properly,
I'll make it the default definition for the workflow.
2024-12-04 12:51:27 -05:00
Louis Dionne
ef164ecedf [libc++][libunwind] Fix documentation CI job after #118159 (#118555) 2024-12-04 12:30:35 -05:00
Nick Desaulniers
ce416a073b [Github] fix libc documentation path (#118514)
Running `ninja docs-libc-html` produces content in
{build_dir}/libc/docs, not
{build_dir}/docs. Presubmit jobs for "Test documentation build" were
failing as
a result of commit 97f94af356 ("[Github] Upload built docs as artifact
from
test build docs job (#118159)")

Link: #118159
Link: #117220
2024-12-03 10:05:10 -08:00
Aiden Grossman
97f94af356 [Github] Upload built docs as artifact from test build docs job (#118159)
This patch makes the test documentation build job upload the docs that
have been built as artifacts. This makes it much easier to take a peek
at the resulting documentation rather than just being able to see that
it builds.
2024-12-02 08:02:49 -08:00
Aiden Grossman
2de2e7aa6f [Github] Fix build metrics container push (#118130)
This patch fixes a couple typos that were preventing the build metrics
container job from pushing the container to GHCR.
2024-11-29 12:09:36 -08:00
Aiden Grossman
9ebab700cd [Github] Add new workflow to build metrics container (#117462)
This patch adds a new Github Actions workflow to build the metrics
container and push it to the Github Container Registry.
2024-11-29 11:35:13 -08:00
Nikolas Klauser
aaa0dd2f05 [libc++][NFC] Remove a bunch of unused environment variables from the CI configs 2024-11-23 12:32:47 +01:00
Louis Dionne
c2a3ed2269 [libc++] Bump libc++ CI to a more recent version of the Docker image (#116558)
The Docker image was built using the recently introduced Action that
builds and pushes to the LLVM Docker registry.
2024-11-18 08:02:40 +01:00
Louis Dionne
2d7ec7f0d3 [libc++] Rename the label for libc++ self-hosted runners (#116540) 2024-11-17 19:04:16 +01:00
Louis Dionne
0fd6f684b9 [libc++] Adjust workflow file for building the libc++ docker image (#116366) 2024-11-16 12:05:12 +01:00
Louis Dionne
649e4bf5d8 [libc++] Update the docker-compose file for actions CI 2024-11-15 10:51:37 +01:00
Louis Dionne
a809405f78 [libc++] Adjust the workflow file for building a Docker image (#116333) 2024-11-15 08:58:43 +01:00
Louis Dionne
1799d57ffa [libc++] Add a Github action to build libc++'s Docker images (#110020)
This patch adds a Github action that runs whenever changes to the libc++
Docker images are pushed to `main`. The action will rebuild the Docker
images and push them to LLVM's container registry so that we can then
point to those images from our CI nodes.
2024-11-15 08:36:28 +01:00
Louis Dionne
2d6459cb28 [libc++] Fix CI issues recently introduced by localization changes (#116216)
After a recent Github Actions runner policy change [1], the version of
Xcode included in the macos-14 image went from Xcode 16 to Xcode 15,
breaking our build bots.

This moves the bots to the macos 15 (public preview) image, which
contains Xcode 16.

Also, adjust an UNSUPPORTED annotation that was incorrectly targeting
macos 13.7 when it should have been targeting a version of AppleClang.

[1]: https://github.com/actions/runner-images/issues/10703
2024-11-15 00:00:54 +01:00
Louis Dionne
e236a52a88 [libc++] Unify the benchmarks with the test suite (#101399)
Instead of building the benchmarks separately via CMake and running them
separately from the test suite, this patch merges the benchmarks into
the test suite and handles both uniformly.

As a result:
- It is now possible to run individual benchmarks like we run tests
  (e.g. using libcxx-lit), which is a huge quality-of-life improvement.

- The benchmarks will be run under exactly the same configuration as
  the rest of the tests, which is a nice simplification. This does
  mean that one has to be careful to enable the desired optimization
  flags when running benchmarks, but that is easy with e.g.
  `libcxx-lit <...> --param optimization=speed`.

- Benchmarks can use the same annotations as the rest of the test
  suite, such as `// UNSUPPORTED` & friends.

When running the tests via `check-cxx`, we only compile the benchmarks
because running them would be too time consuming. This introduces a bit
of complexity in the testing setup, and instead it would be better to
allow passing a --dry-run flag to GoogleBenchmark executables, which is
the topic of https://github.com/google/benchmark/issues/1827.

I am not really satisfied with the layering violation of adding the
%{benchmark_flags} substitution to cmake-bridge, however I believe
this can be improved in the future.
2024-11-07 09:07:50 -05:00