Skip to content

[CI] Update setup-python action to v5 for GHA #95414

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 13, 2024

Conversation

DeinAlptraum
Copy link
Contributor

We currently receive a warning on all Github Actions workflows that use setup-python, since they all use v4 of the action, which uses the deprecated Node.js 16. This PR upgrades the action in all places to v5, which uses Node.js 20 (see setup-python release page)

Copy link

Thank you for submitting a Pull Request (PR) to the LLVM Project!

This PR will be automatically labeled and the relevant teams will be
notified.

If you wish to, you can add reviewers by using the "Reviewers" section on this page.

If this is not working for you, it is probably because you do not have write
permissions for the repository. In which case you can instead tag reviewers by
name in a comment by using @ followed by their GitHub username.

If you have received no comments on your PR for a week, you can request a review
by "ping"ing the PR by adding a comment “Ping”. The common courtesy "ping" rate
is once a week. Please remember that you are asking for valuable time from other developers.

If you have further questions, they may be answered by the LLVM GitHub User Guide.

You can also ask questions in a comment on this PR, on the LLVM Discord or on the forums.

@llvmbot
Copy link
Member

llvmbot commented Jun 13, 2024

@llvm/pr-subscribers-github-workflow

Author: Jannick Kremer (DeinAlptraum)

Changes

We currently receive a warning on all Github Actions workflows that use setup-python, since they all use v4 of the action, which uses the deprecated Node.js 16. This PR upgrades the action in all places to v5, which uses Node.js 20 (see setup-python release page)


Full diff: https://github.com/llvm/llvm-project/pull/95414.diff

5 Files Affected:

  • (modified) .github/workflows/docs.yml (+1-1)
  • (modified) .github/workflows/llvm-project-tests.yml (+1-1)
  • (modified) .github/workflows/pr-code-format.yml (+1-1)
  • (modified) .github/workflows/release-documentation.yml (+1-1)
  • (modified) .github/workflows/release-doxygen.yml (+1-1)
diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml
index d62485e2ebb66..800e929157353 100644
--- a/.github/workflows/docs.yml
+++ b/.github/workflows/docs.yml
@@ -100,7 +100,7 @@ jobs:
         with:
           fetch-depth: 1
       - name: Setup Python env
-        uses: actions/setup-python@v4
+        uses: actions/setup-python@v5
         with:
           python-version: '3.11'
           cache: 'pip'
diff --git a/.github/workflows/llvm-project-tests.yml b/.github/workflows/llvm-project-tests.yml
index a52dd2db8035d..0a228c41f354e 100644
--- a/.github/workflows/llvm-project-tests.yml
+++ b/.github/workflows/llvm-project-tests.yml
@@ -77,7 +77,7 @@ jobs:
       # lldb.  Using this setup-python action to make 3.10 the default
       # python fixes this.
       - name: Setup Python
-        uses: actions/setup-python@v4
+        uses: actions/setup-python@v5
         with:
           python-version: ${{ inputs.python_version }}
       - name: Install Ninja
diff --git a/.github/workflows/pr-code-format.yml b/.github/workflows/pr-code-format.yml
index 983838858ba43..0061ea46f37ab 100644
--- a/.github/workflows/pr-code-format.yml
+++ b/.github/workflows/pr-code-format.yml
@@ -58,7 +58,7 @@ jobs:
           clangformat: 18.1.1
 
       - name: Setup Python env
-        uses: actions/setup-python@v4
+        uses: actions/setup-python@v5
         with:
           python-version: '3.11'
           cache: 'pip'
diff --git a/.github/workflows/release-documentation.yml b/.github/workflows/release-documentation.yml
index 64572906988ba..70e5f08b6f72e 100644
--- a/.github/workflows/release-documentation.yml
+++ b/.github/workflows/release-documentation.yml
@@ -37,7 +37,7 @@ jobs:
         uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
 
       - name: Setup Python env
-        uses: actions/setup-python@v4
+        uses: actions/setup-python@v5
         with:
           cache: 'pip'
           cache-dependency-path: './llvm/docs/requirements.txt'
diff --git a/.github/workflows/release-doxygen.yml b/.github/workflows/release-doxygen.yml
index 12c14bea52f62..ef00a438ce7ac 100644
--- a/.github/workflows/release-doxygen.yml
+++ b/.github/workflows/release-doxygen.yml
@@ -39,7 +39,7 @@ jobs:
         uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
 
       - name: Setup Python env
-        uses: actions/setup-python@v4
+        uses: actions/setup-python@v5
         with:
           cache: 'pip'
           cache-dependency-path: './llvm/docs/requirements.txt'

@DeinAlptraum
Copy link
Contributor Author

@boomanaiden154 @tstellar based on older PRs, I think you are the right people to review GHA stuff?

Copy link
Contributor

@boomanaiden154 boomanaiden154 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

I'm assuming you just grepped for all v4 action uses in the repo (just want to confirm that we don't have any more lying around).

WWe should probably hash pin these at some point, but given they weren't before, probably something to do in a later patch.

Thanks!

@DeinAlptraum
Copy link
Contributor Author

Yup that's right, these are all occurences of setup-python@ in the repository

@boomanaiden154 boomanaiden154 merged commit e387299 into llvm:main Jun 13, 2024
8 of 13 checks passed
Copy link

@DeinAlptraum Congratulations on having your first Pull Request (PR) merged into the LLVM Project!

Your changes will be combined with recent changes from other authors, then tested
by our build bots. If there is a problem with a build, you may receive a report in an email or a comment on this PR.

Please check whether problems have been caused by your change specifically, as
the builds can include changes from many authors. It is not uncommon for your
change to be included in a build that fails due to someone else's changes, or
infrastructure issues.

How to do this, and the rest of the post-merge process, is covered in detail here.

If your change does cause a problem, it may be reverted, or you can revert it yourself.
This is a normal part of LLVM development. You can fix your changes and open a new PR to merge them again.

If you don't get any reports, no action is required from you. Your changes are working as expected, well done!

@DeinAlptraum DeinAlptraum deleted the update-setup-python branch June 13, 2024 17:19
EthanLuisMcDonough pushed a commit to EthanLuisMcDonough/llvm-project that referenced this pull request Aug 13, 2024
We currently receive a warning on all Github Actions workflows that use
`setup-python`, since they all use v4 of the action, which uses the
deprecated Node.js 16. This PR upgrades the action in all places to v5,
which uses Node.js 20 (see [setup-python release
page](https://github.com/actions/setup-python/releases/tag/v5.0.0))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants