Commit Graph

101 Commits

Author SHA1 Message Date
Tom Stellard
95b2c6b3d6 workflows/release-binaries: Use more cores to avoid the 6 hour timeout (#67874) 2023-10-03 11:40:41 -07:00
Tobias Hieta
acb6e855a8 [workflow] Fix abi checker in llvm-tests. Same fix as in 99fb0af80d (#67957)
Fixes #67651
2023-10-02 18:14:02 +02:00
Tobias Hieta
db777db25c [Workflow] Update clang-format to 17.0.1 (#67402)
17.0.1 is our most recent stable version which we decided to follow and
it fixes the issue described in llvm/llvm-project#67343
2023-09-28 08:37:30 +02:00
Tom Stellard
7d6c3a2473 workflows/pr-receive: Ignore draft pull requests (#66578)
This prevent users from being subscribed automatically to draft pull
requests.
2023-09-26 15:58:04 -07:00
Tulio Magno Quites Machado Filho
b2247f85dc workflows/release-tasks: Setup FileCheck and not for release-lit (#66799)
lit tests require commands FileCheck and not. They must be available in
the PATH.

This also guarantees that python3-psutil is installed in order to enable
more tests.

Fixes #64892.
2023-09-25 14:03:34 -03:00
cor3ntin
b7ff03206d [Documentation] Replace recommonmark by myst-parser (#65664)
Recommonmark has been deprecated, then archived last year. This was
tracked by: https://github.com/llvm/llvm-iwg/issues/30

See https://github.com/readthedocs/recommonmark

This patch migrates all our doc to use myst

Additional details for bot maintainers: https://discourse.llvm.org/t/maintenance-required-on-sphinx-build-bots/73612
2023-09-25 14:02:39 +02:00
Tobias Hieta
a6e81df289 [Workflow] Roll back some settings since they caused more issues
This needs more investigation.
2023-09-23 17:53:51 +02:00
Tobias Hieta
cefc31c921 [Workflow] Use a higher max depth
This can fix not being able to fetch the right amounts of history for the code-format flow.
2023-09-23 15:44:16 +02:00
Tobias Hieta
e33703fce9 [Workflow] Try to fix code-formatter failing to find changes in some cases.
See comment here: https://github.com/tj-actions/changed-files#usage-
2023-09-23 15:30:21 +02:00
Tobias Hieta
bd0281669e [workflow] Tweak code formatting workflow to be faster
This should limit how many commits we need to fetch and should be faster.
2023-09-22 17:18:23 +02:00
Tobias Hieta
a1177b0bdb Reland: [Workflow] Add new code format helper.
I landed this format helper, but unfortunately, it didn't work because
of permissions, it could not add comments on a fork's PR. @cor3ntin
informed me there are fixes for this that you had worked on @tstellar -
but I didn't have time to read up on it too much. Can you explain what
changes are needed to get the action to be able to write comments on
fork's PR?
2023-09-22 10:26:09 +02:00
Tobias Hieta
fe5c185641 Revert "[Workflow] Add new code format helper. (#66684)"
This reverts commit da94bf0d56.
2023-09-20 10:01:37 +02:00
Tobias Hieta
da94bf0d56 [Workflow] Add new code format helper. (#66684)
This helper will format python files with black/darker and
C/C++ files with clang-format.

The format helper is written so that we can expand it with new
formatters in the future like clang-tidy.
2023-09-20 08:52:29 +02:00
Danila Malyutin
01475dc29a [github] Make branch workflow more robust (#66781)
Avoid false positives by requiring space after `/branch` command so the
action won't trigger on diffs that include filenames like
`.../BranchProbabilityInfo.cpp`.
2023-09-19 22:18:16 +03:00
Tom Stellard
5e4e2a5aae workflows/pr-receive: Ignore pull requests with 10 or more commits (#66320)
This will cause the auto-labeler not to run on pull requests with more
than 10 commits. Usually larger pull requests like this are mistakes and
we want to avoid generating an excessive amount of notifications.

It may be possible for legitimate pull requests to have 10 or more
commits from people pushing fixup commits to addresss review comments.
However, these pull requests should already have the correct labels by
the time they grow to 10 commits.
2023-09-16 07:45:50 -07:00
cor3ntin
6c8243060d [Github] Use our own issue labeler fork (#65900)
- Only adds 'new issue' if no other label is added
(https://github.com/llvm/llvm-project/issues/65701)

- No not add labels if labels were already set
- Only add `foo` if there are no `foo:bar` label being added (although,
we don't use that yet)

Fixes #65701
2023-09-15 18:14:11 +02:00
Tom Stellard
c532db0133 workflows/pr-subscriber: Use our own custom concurrency implementation (#66263)
The builtin concurrency functionality for the workflows will cancel a
pending job if there is another job from the same workflow running. For
the pr-subscriber job, this means that if multiple labels are added at
the same time, then some of the pr-subscriber jobs will be cancelled and
the PR will not have all the necessary mentions.
2023-09-13 23:46:23 -07:00
Mohammed Keyvanzadeh
859e6aa100 [github] GitHub Actions workflows changes (#65856)
- Remove usages of the non-existent `ignore-forks` field, conditions in
jobs already exist to prevent the jobs from running in forks.
- Don't use variables in the `printf` format string. Use `printf
"..%s.." "$foo"`. ([SC2059](https://www.shellcheck.net/wiki/SC2059))
- Double quote variable expansion to prevent globbing and word
splitting. ([SC2086](https://www.shellcheck.net/wiki/SC2086))
- Prefer `[ p ] || [ q ]` as `[ p -o q ]` is not well defined.
([SC2166](https://www.shellcheck.net/wiki/SC2166))
- Consider `{ cmd1; cmd2; } >> file` instead of individual redirects.
([SC2129](https://www.shellcheck.net/wiki/SC2129))
- Use `$(...)` notation instead of legacy notation `...`.
([SC2006](https://www.shellcheck.net/wiki/SC2006))
- Use `./*glob*` or `-- *glob*` so names with dashes won't become
options. ([SC2035](https://www.shellcheck.net/wiki/SC2035))
- Refactor JavaScript code in certain workflows.
- Change workflow variable substitution style of some workflows to be
consistent with others.
2023-09-13 01:51:47 +03:30
Tom Stellard
64751ea2c5 github-automation: Use a single comment for team mentions on pull requests (#66037)
This will reduce the number of notifications created when a pull request
label is added. Each team will only get a notification when their team's
label is added and not when other teams' labels are added.
2023-09-12 13:21:29 -07:00
Marc Auberer
6d2aaa5fdb [GitHub] use checkout action v4 (#65819)
Upgrade checkout action to v4 to make use of node20.
Node 16, which v3 is using, reaches end of life on 2023-09-11.
2023-09-12 12:08:56 +02:00
Tom Stellard
91fdb20915 workflows: Split new-prs into two workflows
We cannot use the default github token for labeling PRs, because this
will not trigger the PR Subscriber job.  However, we weren't allowed to
use a different token via a secret, because secrets aren't allowed
in PR workflows.

The solution is to create two workflows, the first accepts the
pull_request_taget event extracts the PR number and then starts
the second workflow which adds the labels to the PRs.

This separation ensures that nothing malicious in the first workflow is
able to access the secret we use in the second workflow.
2023-09-08 22:09:33 -07:00
Tom Stellard
1ed710836a workflows: Reconfigure pr-subscriber action so that it can access secrets
Secrets are not available for workflows triggered by PRs, so we need
to split the pr-subscriber action into two separate actions.  The
first will listen for new labels on PRs and the second will add
a comment with the team mention.

See https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
2023-09-08 11:55:59 -07:00
Tom Stellard
ea98e1c537 workflows/pr-subscriber: Limit action to llvm/llvm-project repo 2023-09-08 10:41:06 -07:00
Tom Stellard
e7fa52adcf workflows: Fix typo in pr-subscriber 2023-09-08 10:00:21 -07:00
Tom Stellard
5f16a3a489 workflows: Add a simple pull request subscription workflow (#64913)
This new workflow will make it possible for people to subscribe to pull
requests based on the labels that are added. Labels will be added
automatically to the pull requests based on the modified files and each
label will be associated with a GitHub team that will be notified when
the label is added.

See
https://discourse.llvm.org/t/changes-to-pull-request-subscription-system/73296
2023-09-08 09:40:37 -07:00
Tobias Hieta
d55ac38ace Add GitHub workflow for check Python file formatting (#65482)
Using darker which is doing black on diffs, similar to git-clang-format.
2023-09-08 18:22:20 +02:00
cor3ntin
c144086997 [Github] Workaround a GH action bug causing manually added labels to be removed (#65395)
Fixes https://github.com/llvm/llvm-project/issues/65345
2023-09-05 20:46:41 +02:00
Corentin Jabot
a58c59e679 Revert "Update new-prs.yml"
This was meant to be a test in my personal fork...

This reverts commit ee53efde38.
2023-09-05 19:30:11 +02:00
cor3ntin
ee53efde38 Update new-prs.yml 2023-09-05 19:05:46 +02:00
cor3ntin
d17e6cc9e7 [Github] Add labels on pull requests based on paths. (#65308)
Using https://github.com/actions/labeler, this add a workflow to
automatically label PRs, in hope to reduce the work needed to triage new
PRs.

"new-prs-labeler.yml" has been seeded taking inspiration from the
CODEOWNERS file when there was an existing corresponding label on the
issue tracker.
2023-09-05 15:26:48 +02:00
Corentin Jabot
836f2470fb [Github] Move the issue labeler data out of workflows
To avoid it being considered a workflow script.
2023-09-05 15:10:42 +02:00
cor3ntin
3301edf45d [Github] Improve automatic new issue labelling (#65309)
This patch:
* Replaces `andymckay/labeler` which does not appear to be maintained by
github official solution
* Removes the closed issue workflow which was disabled a few years ago
and never fixed.
* Adds a few rules to add label based on PR title, hopefully that can
make triaging simpler. If that turns out to be useful, we can consider
adding more rules for backends, etc. We could technically also pattern
match the body of the issue but I'm concerned about trying to be _too_
clever.

The new system is only triggered on PR open so manual labels should not
be removed.
2023-09-05 14:53:56 +02:00
Aiden Grossman
3e67d7b682 [Github] Disable repo lockdown (#65161)
Now that PRs are supposed to be open, the repo lockdown needs to be
disabled so people can actually open them up on all parts of the
repository.
2023-09-01 12:09:51 -07:00
Tobias Hieta
1148cfac51 [workflow] Allow creation of PRs in the docs subdir 2023-09-01 12:32:07 +02:00
Louis Dionne
c7663853fa Disable the repo-lockdown script in a narrow way to allow testing CI
This is necessary to allow testing pre-commit CI from GH PRs before
the repo-lockdown script is removed entirely.
2023-08-29 14:06:23 -04:00
Tom Stellard
99fb0af80d workflows: Fix libclang-abi test after update to use download-artifac… (#64877)
workflows: Fix libclang-abi test after update to use download-artifact v3
2023-08-28 09:38:27 -07:00
Tom Stellard
102970091e workflows: Disable repo-lockdown for llvm/utils/git
Reviewed By: rnk

Differential Revision: https://reviews.llvm.org/D158569
2023-08-23 07:51:29 -07:00
Tobias Hieta
28226e5a1b [Workflow] Run the repository sync script from GH.
Also various fixes to the script to work correctly
in GH actions.

Differential Revision: https://reviews.llvm.org/D156873
2023-08-10 09:01:18 +02:00
MyDeveloperDay
8b003c6201 Workflows: Allow pull request for clang-format changes (#64332)
* Allow pull request for clang-format changes

Remove repo lockdown on clang-format specific directories

* Missing / from unittests
2023-08-02 21:12:52 +01:00
Tom Stellard
ffecb43c48 workflows/release-tasks: Add missing sudo 2023-08-01 15:59:04 -07:00
Tom Stellard
5754f5af3c Workflows: Allow pull requests for .github directory
Reviewed By: thieta

Differential Revision: https://reviews.llvm.org/D156595
2023-08-01 13:33:54 -07:00
Chris Bieneman
7b654acc4d [GitHub] Update repo lockdown to exclude lldb
This change enables the LLDB project to begin experimenting with
pull-request workflows to help identify issues was we move toward
adopting pull requests.

Reviewed By: tstellar, JDevlieghere

Differential Revision: https://reviews.llvm.org/D155315
2023-07-14 19:35:15 -05:00
Anton Korobeynikov
06a9975d61 Temporary switch off labeler on closed issues 2023-06-27 11:09:00 -07:00
Tom Stellard
3e984182dc workflows/release-tasks: Upload lit releases to pypi
Reviewed By: thieta, kwk

Differential Revision: https://reviews.llvm.org/D146491
2023-05-31 09:25:19 -07:00
Tobias Hieta
e46aa6d3b6 [NFC][Py Reformat] Reformat version-check.py in .github dir 2023-05-26 08:11:06 +02:00
Tom Stellard
afa607fbac workflows/release-tasks: Remove stray backslash
Reviewed By: thieta

Differential Revision: https://reviews.llvm.org/D150018
2023-05-12 23:34:05 -07:00
Tom Stellard
63bd7726d1 workflows/repo-lockdown: Ignore libcxx and related sub-directories
https://discourse.llvm.org/t/opening-up-prs-experimentally-for-a-subset-of-the-llvm-project/70375/11

Reviewed By: ldionne

Differential Revision: https://reviews.llvm.org/D150314
2023-05-12 23:20:24 -07:00
Tom Stellard
74acaf1809 workflows/release-binaries: Install missing dependencies
Reviewed By: thieta

Differential Revision: https://reviews.llvm.org/D148772
2023-04-20 08:21:53 -07:00
Tom Stellard
93d6289c98 workflows/release-tasks: Always run apt-get update before installing deps
There is a bug in the package tree of on the default images that
causes some dependencies not to be found.  Running apt-get gets us
the latest package lists rather than relying on the default lists
in the GitHub Runner imgae, which can be up to a week old.

Running apt-get update before intstalling packages is also recommended in
the official github documentation:

https://docs.github.com/en/actions/using-github-hosted-runners/customizing-github-hosted-runners#installing-software-on-ubuntu-runners

Reviewed By: thieta

Differential Revision: https://reviews.llvm.org/D148741
2023-04-20 08:15:50 -07:00
Tom Stellard
cd39791350 workflows/release-binaries: Add missing output variable
Reviewed By: thieta

Differential Revision: https://reviews.llvm.org/D148734
2023-04-19 12:59:00 -07:00