Commit Graph

328 Commits

Author SHA1 Message Date
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
Eric
97262afa6d Allow specifying libcxx builder image. (#110303)
This change attempts to shift the libc++ builders over to new backend
infrastructure that allows running an arbitrary container for the
libc++ job.

This has been a long time in the making, and support from github
and gke is finally at the point where it's possible (hopefully).

This change should also demonstrate another important property:
No Downtime Upgrades.

If this goes well, we'll be able to test the upgrade as a part
of the PR process, and then commiting it to main should (ideally)
not break anything.
2024-11-05 16:30:49 -05:00
Louis Dionne
f2019fc5ca [libc++] Upload CMakeConfigureLog artifacts (#114445)
This is helpful to debug CMake configuration issues such as the ones
that can happen when we build an external project (like
GoogleBenchmark).
2024-11-01 09:41:45 -04:00
Aiden Grossman
f87f3ad6ea [Github] Bump CI compiler version to 19.1.2 (#113016) 2024-10-19 10:42:33 -07:00
Brad Richardson
06eb10dadf [flang][driver] rename flang-new to flang (#110023)
This does a global rename from `flang-new` to `flang`. I also
removed/changed any TODOs that I found related to making this change.

---------

Co-authored-by: H. Vetinari <h.vetinari@gmx.com>
Co-authored-by: Andrzej Warzynski <andrzej.warzynski@arm.com>
2024-10-10 09:26:04 +01:00
Tom Stellard
9cd289fa4a workflows/release-documentation: Submit a pull request with changes (#108247)
This is instead of pushing directly. Creating a pull request is slightly
more work for the release manager, but it is more secure as we no longer
need a secret with write access to the www-releases repo.
2024-10-01 06:12:03 -07:00
Tom Stellard
8f2aa9dbad workflow/release-binaries: Checkout sources before downloading artifacts (#109349)
The actions/checkout step will clear the current directory, so we need
to checkout the sources first so that the downloaded artifacts won't be
deleted.
2024-10-01 06:11:15 -07:00
Louis Dionne
0547e573c5 [runtimes] Run backdeployment CI on Github hosted runners (#109984)
This removes the need for macOS nodes in Buildkite. It also moves to the
proper way of testing backdeployment, which is to actually run on the
target OS itself, instead of using packaged dylibs from previous OS
versions and trying to emulate backdeployment with DYLD_LIBRARY_PATH.

As a drive-by change, also fix a few back-deployment annotations that
were incorrect and add support for minor versions in the Lit feature
determining availability from the target triple.
2024-09-30 17:08:44 -04:00
Keith Smiley
75ad8b23c0 workflows/release-binaries-all: trigger for Release.cmake (#110394) 2024-09-28 21:23:18 -07:00
Tom Stellard
f14fd32602 workflows/commit-access-review: Use get_collaborators() function (#108313)
This gets us the full list of users with commit access to
llvm/llvm-project rather than the list of people in the llvm-committers
team. This will ensure we are able everyone to track everyone with
commit access in case they receive access some other way.
2024-09-16 13:37:49 -07:00
Tom Stellard
ab96409180 workflows/release-binaries: Fix automatic upload (#107315) 2024-09-12 09:50:57 -07:00
Martin Storsjö
5024dff6ee [libc++][ci] Add a test configuration with an incomplete sysroot (#107089)
When bringing up a new cross compiler from scratch, we build
libunwind/libcxx in a setup where the toolchain is incomplete and unable
to perform the normal linker checks; this requires a few special cases
in the CMake files.

We simulate that scenario by removing the libc++ headers, libunwind and
libc++ libraries from the installed toolchain.

We need to set CMAKE_CXX_COMPILER_WORKS since CMake fails to probe the
compiler. We need to set CMAKE_CXX_COMPILER_TARGET, since LLVM's
heuristics fail when CMake hasn't been able to probe the environment
properly. (This is normal; one has to set those options when setting up
such a toolchain from scratch.)

This adds CI coverage for these build scenarios, which otherwise seldom
are tested by some build flow (but are essential when setting up a cross
compiler from scratch).
2024-09-05 10:25:41 -04:00
Tom Stellard
ef50970204 workflows/release-binaries: Remove .git/config file from artifacts (#106310)
The .git/config file contains an auth token that can be leaked if the
.git directory is included in a workflow artifact.
2024-08-30 19:46:33 -07:00
Aiden Grossman
1293ab35e4 [Github] Cancel previous in-progress code formatting jobs (#106701) 2024-08-30 14:43:15 -07:00
Aiden Grossman
54916e5784 [Github] Set code formatting job timeout to 30 minutes (#106674)
This patch sets the timeout of the code formatting job to 30 minutes.
The job is currently failing in specific circumstances and needs to be
reworked, but as a temp hack, change the timeout to 30 minutes so that
we can catch these jobs before they hit the Github Actions timeout limit
of six hours.

Somewhat (hackily) alleviates #79661 slightly.
2024-08-30 01:08:38 -07:00
Tom Stellard
9d81e7e36e workflows/release-tasks: Pass required secrets to all called workflows (#106286)
Called workflows don't have access to secrets by default, so we need to
explicitly pass secrets that we use.
2024-08-28 22:18:08 -07:00
Tom Stellard
8927576b8f workflows/release-binaries: Enable flang builds on Windows (#101344)
Flang for Windows depends on compiler-rt, so we need to enable it for
the stage1 builds. This also fixes failures building the flang tests on
macOS.

Fixes #100202.
2024-08-28 18:22:57 -07:00
Nikolas Klauser
ec9f36a624 [libc++] Switch to the current XCode beta on macOS builders (#106363)
This unblocks a ton of work including #76756 as it updates to a newer
version of AppleClang.
2024-08-28 09:02:52 -04:00
Keith Smiley
d2b420cc27 [Release] Add keith to valid archive uploaders (#106018)
I am interested in helping contribute macOS binaries since we're
generally sporadic with uploading these.

Fixes https://github.com/llvm/llvm-project/issues/106016
2024-08-27 21:29:43 -07:00
Louis Dionne
e19c3a7e8d [libc++] Move some macOS CI jobs to Github actions (#89083)
This patch decouples macOS CI testing from BuildKite, which makes the
maintenance of macOS CI easier and more accessible to all contributors.
Right now, the macOS CI is running entirely on machines owned by the
LLVM Foundation with only a small set of contributors having direct
access to them. In particular, updating these machines is currently
a very time-consuming manual process that requires taking the machines
offline, and using Github-provided instances makes that an order of
magnitude easier.

The story for performing back-deployment testing still needs to be
figured out, so for now we are retaining some jobs under BuildKite.
2024-08-27 17:28:12 -04:00
Joseph Huber
7ad7f8f7a3 [libcxx] Add LIBCXX_HAS_TERMINAL_AVAILABLE CMake option to disable print terminal checks (#99259)
Adds a new CMake option called `LIBCXX_HAS_TERMINAL_AVAILABLE` that
prevents us from checking for `isatty`.
2024-08-21 08:48:53 -05:00
Tom Stellard
84efc8ed46 [workflows] Add a new workflow for checking commit access qualifications (#93301)
This workflow produces a list of users that should be moved to the LLVM
Triagers team. An admin will review the list and then manually move
people to the LLVM Triagers Team.

I've also added some documentation to the Developer Policy about the
Triage Role.

See
https://discourse.llvm.org/t/rfc2-new-criteria-for-commit-access/77110
for more details.
2024-08-15 17:08:24 -07:00
Tobias Stadler
9811971860 [GitHub] Run format job on stacked PRs (#102957)
Currently the formatter only runs for the main branch, which prevents
the formatter from running for stacked PRs, which have to target user
branches instead of main.
2024-08-14 14:10:57 +02:00
Aiden Grossman
167c71ad86 Bump CI container clang version to 18.1.8 (#102803)
This patch bumps the CI container LLVM version to 18.1.8. This should've
been bumped a while ago, but I just noticed that it was out of date.
This also allows us to drop a patch that we manually had to add as it is
by default included in v18.
2024-08-11 11:01:15 -07:00
Jannick Kremer
458fa12202 [Github] Allow CI to run different Python version tests at once (#102455)
Previously, #77219 added a `python_version` parameter for the Github
Actions CI Ninja-based build tests. This is necessary to run component
tests on different Python versions, as is currently done by the only
user of this parameter, the [Libclang Python bindings
test](https://github.com/llvm/llvm-project/blob/main/.github/workflows/libclang-python-tests.yml).
The parameter is missing from the concurrency group of the
workflow, meaning that starting the workflow with two different Python
versions immediately cancels one of them, as pointed out by
https://github.com/llvm/llvm-project/pull/77219#issuecomment-1937105822.
This change fixes that problem by making the Python version part of the
concurrency group key, and removes the superfluous concurrency group
from the calling workflow.
2024-08-08 19:43:01 +02:00
Tom Stellard
82c2259aeb workflows: Fix permissions for release-sources job (#100750)
For reusable workflows, the called workflow cannot upgrade it's
permissions, and since the default permission is none, we need to
explicitly declare 'contents: read' when calling the release-sources
workflow.

Fixes the error:
The workflow is requesting 'contents: read', but is only allowed
'contents: none'.
2024-08-07 14:19:22 -07:00
Tom Stellard
1fb1a5d8e2 workflows/release-binaries-all: Pass secrets on to release-binaries workflow (#101866)
A called workflow does not have access to secrets by default, so we need
to explicitly pass any secret that we want to use.
2024-08-05 14:40:46 -07:00
Tom Stellard
3c8dadda3a workflows/release-binaries: Give attestation artifacts a unique name (#102041)
We need a different attestation for each supported architecture, so
there artifacts all need to have a different name.

The upload step is run on a Linux runner, so no matter which
architecture's binary is being uploaded the runner.os and runner.arch
variables would always be 'Linux' and 'X64' and so we can't use them for
naming the artifact.
2024-08-05 14:38:56 -07:00
Tom Stellard
dc349a3f47 workflows/release-tasks: Add missing permissions for release binaries (#102023)
Now that the release binaries create artifact attestations, we need to
ensure that we call the workflow with the correct permissions.
2024-08-05 13:30:04 -07:00
Tom Stellard
59476c9998 workflows/release-binaries: Fix problem with python installation on macos-14 (#101774)
python3 wasn't able to see modules installed by pip, so we need to use
the setup-python action to ensure that the default pip and python3 both
use the same prefix.

See https://github.com/actions/runner-images/issues/10385
2024-08-03 09:11:51 -07:00
Tom Stellard
14837aff05 workflows: Re-implement the get-llvm-version action as a composite action (#101569)
The old version in the llvm/actions repo stopped working after the
version variables were moved out of llvm/CMakeLists.txt. Composite
actions are more simple and don't require javascript, which is why I
reimplemented it as a composite action.

This will fix the failing abi checks on the release branch.
2024-08-02 21:52:03 -07:00
Tom Stellard
0512ba0a43 workflows: Fix libclc-tests (#101524)
The old out-of-tree build configuration stopped working and in tree
builds are supported now, so we should use the in tree configuration.
The only downside is we can't run the tests any more, but at least we
will be able to test the build again.
2024-08-01 11:23:03 -07:00
Tom Stellard
41003ff3fe workflows/release-binaries: Fetch composite actions outside of default workspace (#100845)
Otherwise, the checkout step will override them.
2024-07-30 18:54:20 -07:00
Tom Stellard
d41f565318 workflow/release-binaries: Fix typo
Introduced in b0860b2087.
2024-07-26 14:51:54 -07:00
Tom Stellard
b0860b2087 workflows/release-binaries: Always pull composite actions from main branch (#100805)
If we pull from the release tag, then if there is a bug in one of the
actions on the release tag, then we can never do a build for that tag.
Pulling from main will allows us to fix bugs in the actions we use to
build the releases.
2024-07-26 14:46:32 -07:00
Tom Stellard
18dee70168 workflows: Remove left over debugging step from release-binaries job 2024-07-26 12:36:40 -07:00