21 Commits

Author SHA1 Message Date
Tom Stellard
2836d8edbf
[workflows] Fix permissions check for creating new releases (#81163)
The default GitHub token does not have read permissions on the org, so
we need to use a custom token in order to read the members of the
llvm-release-managers team.
2024-02-20 17:52:38 -08:00
Tom Stellard
aa02002491
workflows: Refactor release-tasks.yml (#69523)
* Split out the lit release job and the documentation build job into
their own workflow files. This makes it possible to manually run these
jobs via workflow_dispatch.
    
* Improve tag/user validation and ensure it gets run for each release
task.
2024-01-17 17:17:00 -08:00
Diogo Teles Sant'Anna
f3524e9aeb
Hashpin sensitive dependencies and configure dependabot to update them automatically (#75859)
Closes #75620 

As I mentioned on the issue, this PR aims to hash-pin the CI
dependencies used on sensitive context -- i.e., they either are called
with write permissions, or are being used to build critical artifacts
like a release. In summary, this PR brings 3 changes:

1. Hash pin GitHub Actions called on sensitive context
2. Hash pin python dependencies used on sensitive context
3. Configure dependabot to automatically update those hashes
I'm further explaining the steps bellow.

The dependencies in format of GitHub Actions, I simply hash-pinned them.
I also made sure to keep the human-readable version as comments at the
same line.

At the
[release-tasks.yml](https://github.com/llvm/llvm-project/blob/main/.github/workflows/release-tasks.yml)
file, I've changed the installation method of some python dependencies
to install them considering their hashpinning. That required the
generation of a requirements file that had all the correct hashes, and
for that I used [pip-tools](https://pypi.org/project/pip-tools/2.0.0/).

While configuring dependabot, I set it to send a monthly PR updating all
the GitHub Actions, and a weekly PR to update any python dependency
required by
[/llvm/docs/requirements.txt](https://github.com/llvm/llvm-project/blob/main/llvm/docs/requirements.txt).

Let me know if you have any questions or concerns, I'd be happy to
clarify and help.

Thanks!

---------

Signed-off-by: Diogo Teles Sant'Anna <diogoteles@google.com>
2024-01-15 12:30:41 -08:00
Tom Stellard
afdad4fd40
workflows/release-tasks: Fix release note artifact upload (#69522) 2023-10-19 14:02:23 -07:00
Tom Stellard
1db8abf21a
workflows/release-lit: Pass correct build directory to pypa/gh-action-pypi-publish (#69438) 2023-10-18 14:02:05 -07:00
Tom Stellard
6a7f0b9d9f
workflows/release-lit: Fix dev suffix removal (#69397)
This was broken by b71edfaa4ec3c998aadb35255ce2f60bba2940b0.
2023-10-18 14:01:53 -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
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
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
ffecb43c48 workflows/release-tasks: Add missing sudo 2023-08-01 15:59:04 -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
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
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
Mohammed Keyvanzadeh
2b88298c2a
[github] update action and use major version
- Update the `actions/download-artifact` action to version 3.
- Use the major version of an action instead of specifying the minor or patch versions.

Differential Revision: https://reviews.llvm.org/D148327
2023-04-15 00:52:44 +03:30
Tom Stellard
64c30dc9a2 workflows/release-tasks: Fix missing suffix on doxygen tarballs
Reviewed By: thieta

Differential Revision: https://reviews.llvm.org/D145997
2023-03-27 23:28:18 -07:00
Tom Stellard
c52e947f9c workflows/release-tasks: Upload release notes as an artifact
This make sure the docs are always available and can be manually uploaded
if a later step fails.

Reviewed By: thieta

Differential Revision: https://reviews.llvm.org/D145996
2023-03-27 23:17:14 -07:00
Joyce Brum
829b8912cd feat: harden permissions for all github workflows
Signed-off-by: Joyce Brum <joycebrum@google.com>

Reviewed By: tstellar

Differential Revision: https://reviews.llvm.org/D144119
2023-03-03 21:34:27 -08:00
Mohammed Keyvanzadeh
d30b187f7d
[github] update actions and make tweaks
- Update the GitHub workflow actions to their latest versions.
- Use the latest Node.js LTS release.
- Use the latest Ubuntu version for consistency across all workflows.
- The `set-output` command is deprecated and will soon be disabled (https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/) so use the new recommended way.
- Use the `$()` expressions for string interpolation instead of the deprecated backticks in Bash.
- Format the YAML files.

Differential Revision: https://reviews.llvm.org/D143015
2023-02-01 06:23:33 +03:30
Tobias Hieta
46a315a331
[workflow] Run release tasks for me (tru) as well.
Reviewed By: tstellar

Differential Revision: https://reviews.llvm.org/D131493
2022-08-10 10:02:26 +02:00
Tom Stellard
66d755bbf8 workflows: Add GitHub action for automating some release tasks
For each release tag, this action will create a new release on GitHub,
and for each -final tag, this action will build the documentation and
upload it to GitHub.

Reviewed By: hans, kwk

Differential Revision: https://reviews.llvm.org/D99780
2022-07-26 15:36:51 -07:00