Commit Graph

163 Commits

Author SHA1 Message Date
eric
c03745d23a libc++-infa: Hotfix runner group
The runners-32 group is broken, for reasons...
The easiest fix is to move the jobs to runners-8.
(which needs to be renamed, because they're all actually 30 core
machines)
2023-12-21 21:34:21 -05:00
Tom Stellard
c5b3b5e0e8 workflows/release-binaries: Add schedule to run job once per month (#73812)
This will help catch any regressions introduced in the main branch
before we start release testing.
2023-12-13 12:50:52 -08:00
Mark de Wever
ed210f9f5a [libc++][CI] Tests the no RTTI configuration. (#65518)
There are a few drive-by fixes:
- Since the combination RTTI disabled and exceptions enabled do not
work, this combination is prohibited.
- A small NFC in any fixing clang-tidy.

The code in the Buildkite configuration is prepared for using the std
module. There are more fixes needed for that configuration which will be
done in a separate commit.
2023-12-12 17:11:53 +01:00
David Spickett
c8655fce45 [GitHub] Remove author association print from new-prs workflow
Turns out, new contrbiutor association is in fact `NONE`.

Example: https://github.com/llvm/llvm-project/pull/75182

```
Run echo "$AUTHOR_ASSOCIATION"
NONE
```
2023-12-12 14:49:03 +00:00
David Spickett
7cee4704ae [GitHub] Try a workaround to get the new contributor greeting to work (#75036)
For reasons unknown, the FIRST_TIMER and FIRST_TIME_CONTRIBUTOR states
don't come through on new user PRs, I have opened
https://github.com/orgs/community/discussions/78038 to see if that's my
mistake or GitHub's.

In the meantime, a possible workaround is to check that we have none of
the other states. If there's some bug that means the first time
associations aren't available in workflows, maybe the association will
be "NONE".

Also added a debug step to print that association so I can add it to the
linked report. I will remove this as soon as I have 1 example PR.
2023-12-12 09:53:03 +00:00
Aiden Grossman
b3af755254 [Github] Set start rev to merge base in code format action (#75132)
This patch sets the start revision to the merge base so that the c++
formatting action won't produce any diffs related to changes in main but
not in the PR branch. This also leaves a TODO to migrate over to the
--diff_from_common_commit option in git-clang-format once LLVM v18 is
released.
2023-12-11 21:46:51 -08:00
Natalie Chouinard
f2afd10776 [github] Enable assertions on test workflow (#74849) 2023-12-11 13:58:18 -05:00
Natalie Chouinard
155a013225 [SPIR-V] Add pre-commit CI workflow (#74092)
Add a pre-commit CI workflow for the experimental SPIR-V backend. This
action should only run when SPIR-V target or test files are modified.
The `codegen-spirv` tests don't run as part of `check-all` because the
SPIR-V backend is still experimental.

Depends on #73371 (for a green tree)
2023-12-07 09:42:30 -05:00
Eric
1e3af94253 Disable fail-fast for libc++ builders. (#74485)
It seems the fail fast just doesn't strike the right balance.
It wastes too many resources, especially if a build is killed because
the machine it was running on got preempted.

Instead, we should simply not run any future jobs if a failure has
occured, while letting the already running jobs finish.
2023-12-05 15:01:46 -05:00
David Spickett
77249546aa [GitHub] Add greeting comment to opened PRs from new contributors (#72384)
This includes some commonly needed information like how to add
reviewers.

This is implemented as a job before the labeler, so that on a new PR the
comment is added before there are any subscribers and only the author
gets a nofitication.

The labeler job depends on the greeter having run or having been
skipped. So if the PR wasn't just opened, or it's from a regular
contributor, the labeling still happens.

But we can be sure that when a greeting comment is left, it's the very
first thing we do.
2023-12-05 11:28:43 +00:00
Eric
4596dd103c Change how libc++ specifies the runners to use. (#74188)
Github actions has some quirks with how you use runner groups, labels,
names, etc... One of them is that groups can't "group" more than one set
of builders. To do that, you use the same name. So now we're specifying
the name.
2023-12-03 20:12:09 -05:00
Eric
0737be349d Add a scheduled build for libc++ (#73848)
We had a scheduled build on buildkite, we probably want something
testing head here as well.

Since this change just adds more tests, I think we can skip pre-commit  review.

[skip ci]
2023-11-29 17:36:44 -05:00
Eric
9ac64abc02 [libc++] Remove linux Buildkite builders entirely (#73825)
This removes the Google hosted Linux buildkite builders. We have since
moved all of them over to github actions.

Follow up changes will be sent for android.
2023-11-29 17:34:45 -05:00
Tom Stellard
f150ecc322 [workflows] Add top-level permissions for libcxx-build-and-test.yaml (#73689)
This is the standard convention for our workflow files.
2023-11-29 13:33:52 -08:00
Tom Stellard
dc16964f0e [workflows] Remove sync-release-repo.yml (#73682)
This should not be needed now that the project uses PRs, plus the
OpenSSF Scorecard report flagged this as insecure.
2023-11-29 07:53:51 -08:00
Chris Bieneman
488d900209 [NFC] Map changed file through envar
This sanitizes the string for printing.
2023-11-27 16:41:25 -06:00
Jinsong Ji
85ee351aa7 [CI] Skip libcxx in non-llvm repo (#73282)
The new libcxx workflow are run and failing in non llvm repo.
Skip it similar to other workflow.
2023-11-24 09:44:49 -05:00
Aiden Grossman
17fcad7f84 [Github] Build clang docs in CI if autogenerated files change (#72623)
These are unlikely to produce errors in the build, assuming that the
tablegen emitter works as expected, but we're still losing some
documentation build testing coverage but not building upon changes to
these files.
2023-11-24 02:20:58 -08:00
Tom Stellard
e746b56c98 workflows/release-binaries: Do a preliminary build to fill ccache (#72576)
Build clang with the host compiler and ccache enabled in order to speed
up the phase 1 builds. This helps reduce the amount of time spent
running on the non-free builders.
2023-11-21 12:29:20 -08:00
eric
f4c6947a18 Move all libc++ builders to one machine type.
There are ongoing issues with the libc++ bots, some of them seem
related to a new release of the gha action runner controllers.

Until I get this figured out, it's a lot easier to have 99% of the
bots using a single machine shape
2023-11-20 14:48:24 -05:00
Aiden Grossman
aafd2119fa [Github] Fix typo
I swore I copied the if statement from somewhere, but whatever I did to
it while moving it over dropped one of the equals signs. This patch
fixes that so the action will actually work properly.
2023-11-18 22:56:15 -08:00
Aiden Grossman
9342458913 [Github] Prevent scorecard action from running on forks (#72780)
Currently, the scorecard action runs on forks. This means that every
recent fork will be periodically running a job that doesn't really make
a lot of sense to run outside the main monorepo. This patch fixes that
by restricting the job to only run in the monorepo.
2023-11-18 22:52:37 -08:00
Aiden Grossman
48c5c1b1f9 [Github] Add build Flang docs in CI if autogenerated files change (#72721)
Currently, when changes are made to the tablegen files that build the
docs, the docs build is not tested. This should rarely cause breakages,
but it's cheap to test and there isn't a major reason not to.
2023-11-18 12:17:52 -08:00
eric
f8df86e345 Change libc++ builder group name to match what I am using in the infra
Also change over to using group names instead of specific runner names.
This will prevent future downtime.
2023-11-18 03:42:14 -05:00
Eric
9ed4a57e31 Add libc++ github actions workflow to replace buildkite (#71836)
This change ports almost all of the linux buildkite builders to github
actions.

I would like to have this transition occur as soon as possible.
2023-11-17 08:57:01 -05:00
David Spickett
a39a28d2ea [GitHub] Add --fail to curl commands (#72238)
This means that if we try to download a missing file, we do not get a
document with the same file name, but containing only the http response
code.

```
$ curl -O -L --fail https://raw.githubusercontent.com/llvm/llvm-project/main/.github/workflows/not-a-file.py
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (22) The requested URL returned error: 404
$ $?
22: command not found
```

Which will be less confusing than python complaining about the file
contents.
2023-11-14 14:24:24 +00:00
David Spickett
9cb1673fa5 [GitHub] Remove pr-subscriber-wait.py download (#72120)
This file and uses of it were removed in
64d5da60d4.
2023-11-14 08:21:33 +00:00
Aiden Grossman
688664fd19 [Github] Make code formatting action checkout SHA rather than ref
Checking out a ref of the branch requires the remote to be the same as
the fork whereas setting it to be the commit SHA allows for us to avoid
changing the remote. This should fix the action not working on PRs made
from forks (essentially all of them).
2023-11-11 20:33:03 -08:00
Aiden Grossman
1a66465c72 [Github] Fetch through merge base in code formatting action (#72020)
This commit adds another step to the Github workflow that runs the code
formatting check to fetch through the merge base. This ensures that the
necessary history is present to find the changed files and also to run
clang-format over. This change massively increases the speed of the
action (~10 minutes down to ~2 minutes in most cases from my testing)
and also increases the reliability significantly.
2023-11-11 19:48:03 -08:00
Aiden Grossman
83888a5404 [Github] Only run github actions on main monorepo (#69774)
There are currently a couple jobs that run on all forks of LLVM too (if
there is a PR opened, or in the case of the documentation builds, upon
pushing to main). This isn't desired behavior. This commit disables that
behavior, forcing the jobs to not run if they aren't running against
llvm/llvm-project or a PR against that repo.
2023-11-04 00:17:06 -07:00
Aiden Grossman
9189cd6452 [Github] Add flang docs to Github actions (#70530)
This patch enables building the flang docs in Github actions to enable
rapid iteration in PRs and to catch docs build failures more easily
before merge/after merge. This patch currently doesn't fail for Sphinx
warnings, but the intention is to enable this functionality once the
flang docs are fixed to build without warnings after the transition to
Myst.
2023-11-04 00:16:35 -07:00
Tom Stellard
64d5da60d4 workflows: Unsplit pr-subscriber (#69748)
This is essentially a revert of
1ed710836a. It is safe to use the
pull_request_target event for pr-subscriber, because it does not
checkout any code from the pull request branch.
2023-11-01 12:38:31 -07:00
Tom Stellard
67a53ae73b workflows/scorecard: Run this job once per day instead of for every push
We started going over our API limits and suspect this was the cause.
For now, we'll run it once a day while we sort this out.
2023-11-01 12:33:12 -07:00
Tom Stellard
e2c440b5da workflows: Unsplit new-prs (#69560)
This is essentially a revert of
91fdb20915. It is safe to use the
pull_request_target event for new-prs, because it does not checkout any
code from the pull request branch.
2023-11-01 12:24:20 -07:00
Chris B
f2c24cceed Increase git fetch depth (#70946)
We've gotten ~750 commits in the last 7 days. Upping the fetch depth to
2000 will make it more likely that PRs up to 2 weeks old will have
enough fetch history to find a common parent. This _might_ address some
of the failures we're seeing in the clang-format action where it cannot
find a common base commit.
2023-11-01 13:24:28 -05:00
Diogo Teles Sant'Anna
0d3377c496 Add Scorecard Action (#69933)
Closes #69736
2023-11-01 11:08:26 -07:00
Aiden Grossman
96410a6b14 Revert "[Github] Fetch all commits in PR for code formatting checks (#69766)"
This reverts commit 4aa12afb96.

This change introduced failures upon checking out the PR source code.
Pulling this out of tree while I investigate further.
2023-10-30 12:33:35 -07:00
Aiden Grossman
4aa12afb96 [Github] Fetch all commits in PR for code formatting checks (#69766)
This patch makes a couple changes to the PR code formatting check:
- Moves the `changed-files` action to before the checkout to make sure
that it pulls
information from the Github API rather than by running `git diff` to
alleviate some
performance problems.
- Checkout the head of the pull request head instead of the base of the
pull request
to ensure that we have the PR commits inside the checkout.
- Add an additional sparse checkout of the necessary LLVM tools to run
the action
to alleviate security problems introduced by checking out the head of
the pull
request. Only code from the base of the pull request runs.
- Adjust the commit references to be based on `HEAD` as Github doesn't
give
exact commit SHAs for the first commit in the PR.
2023-10-30 12:23:51 -07:00
Aiden Grossman
5cfa03ef25 [Github] Add Polly docs to Github actions (#70531)
This patch enables building the polly docs in CI to catch warnings/build
regressions in the documentation.
2023-10-29 12:49:34 -07:00
Aiden Grossman
66464eb966 [Github] Add OpenMP docs to Github docs action (#70529)
This patch enables building the openmp documentation through Github
actions during PRs and at tip of tree to ensure that the documentation
builds and that there aren't any Sphinx warnings in a manner that
enables more rapid developer iteration without having to install
documentation tooling.
2023-10-29 12:41:09 -07:00
Jinsong Ji
cf07904ee4 [Github] Fix libc docs build (#70363)
https://github.com/llvm/llvm-project/pull/69824 added libc build, but
missed the folder in ninja command, is causing failures.

ninja: fatal: chdir to 'docs-libc-html' - No such file or directory
ninja: Entering directory `docs-libc-html'
2023-10-26 14:26:47 -04:00
Aiden Grossman
68d993e913 [Github] Add lld to docs CI (#69821)
This patch adds the lld documentation to the documentation github
actions CI to automatically validate in PRs/at tip of tree that the docs
build and there aren't any Sphinx warnings. There is existing buildbot
coverage for the lld docs, but this much more convienient to use in
cases like PRs.
2023-10-25 21:55:38 -07:00
Aiden Grossman
888f07031b [Github] Add support for building libc docs in Github actions (#69824)
This patch adds support for building the libc docs in Github actions.
This eanbles easily diagnosing doc build failures/warnings in PRs and at
the tip of tree.
2023-10-24 12:04:25 -07:00
Aiden Grossman
099ce25663 [Github] Fetch before files changed action on push in docs action
My previous commit 397f1ce9ef switched up
the docs github action to use the GH API for pull requests. However,
this breaks the action when pushing to a branch as the Github API can't
provide diffs for commits. This patch fixes that by creating a local
checkout beforehand on push events for determining the changed files.
2023-10-23 22:09:02 -07:00
Aiden Grossman
397f1ce9ef [Github] Use API to fetch PR diff for docs action (#70001)
People are currently running into issues where the files-changed step
isn't able to find the merge base. This seems to happen more often on
very out of date branches. This patch side steps the issue by just
fetching the diff from the GH API.
2023-10-23 21:34:06 -07:00
Aiden Grossman
6768a3d431 [Github] Add libcxx docs to CI (#69828)
This patch adds a step to the documentation Github action to build the
libc++ docs if they have changed. This enables easily diagnosing build
failures/warnings in PRs.
2023-10-23 20:27:08 -07:00
Aiden Grossman
d61e915460 [Github] Add libunwind to docs CI (#69830)
This patch adds the libunwind docs to the Github docs action which
enables easy triage of docs build failures in Github PRs. There is
already buildbot coverage of this configuration, but it is much less
convenient to use in PRs.
2023-10-23 20:24:46 -07:00
Aiden Grossman
6250afe37f [Github] Fetch an additional commit for docs CI on PRs
There still seem to be issues with the files changed step taking a
significant amount of time on PRs. This seems to be occurring on PRs
with one commit and not on PRs with more than one commit which is why I
didn't catch this nuance before. Either way, fetching an additional
commit seems to fix the issue. Requires a little bit of hackiness due to
the fact that you can't do math in the github actions variables.

Will be monitoring this over the next little bit to see if this actually
fixes the problem.

CI stuff is annoying sometimes.
2023-10-21 16:45:20 -07:00
Aiden Grossman
5ce45e9d8e [Github] Add lldb docs step to Github docs action (#69832)
This patch adds a step to build the lldb docs when they change to the
Github docs action, enabling easy triage of warnings/docs build failures
during the PR process.
2023-10-21 15:42:29 -07:00
Aiden Grossman
40a5044af8 [Github] Add clang-tools-extra docs to CI (#69827)
This patch adds the clang-tools-extra docs to the Github CI job that
builds docs, enabling the ability to easily ensure the docs build
properly without warnings in PRs and at the tip of tree.
2023-10-21 15:32:51 -07:00