Skip to content

workflows: Fixes for building the release binaries #83694

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 2 commits into from
Mar 8, 2024

Conversation

tstellar
Copy link
Collaborator

@tstellar tstellar commented Mar 2, 2024

Since aa02002 we weren't installing the correct dependencies, and since 2836d8e we must pass a custom token to github-upload-release.py for verifying permissions.

Since aa02002 we weren't installing the
correct dependencies, and since 2836d8e
we must pass a custom token to github-upload-release.py for verifying
permissions.
@llvmbot
Copy link
Member

llvmbot commented Mar 2, 2024

@llvm/pr-subscribers-github-workflow

Author: Tom Stellard (tstellar)

Changes

Since aa02002 we weren't installing the correct dependencies, and since 2836d8e we must pass a custom token to github-upload-release.py for verifying permissions.


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

1 Files Affected:

  • (modified) .github/workflows/release-binaries.yml (+8-1)
diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index ebf6fa41898dc4..eb3a4f0fc94625 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -44,14 +44,21 @@ jobs:
       upload: ${{ steps.vars.outputs.upload }}
 
     steps:
+    - name: Install Dependencies
+      run: |
+        sudo apt-get update
+        sudo apt-get install -y \
+            python3-github
+
     - name: Checkout LLVM
       uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
 
     - name: Check Permissions
       env:
         GITHUB_TOKEN: ${{ github.token }}
+        USER_TOKEN: ${{ secrets.RELEASE_TASKS_USER_TOKEN }}
       run: |
-        ./llvm/utils/release/./github-upload-release.py --token "$GITHUB_TOKEN" --user ${{ github.actor }} check-permissions
+        ./llvm/utils/release/./github-upload-release.py --token "$GITHUB_TOKEN" --user ${{ github.actor }} --user-token "$USER_TOKEN" check-permissions
 
     - name: Collect Variables
       id: vars

run: |
sudo apt-get update
sudo apt-get install -y \
python3-github
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm thinking we should probably install from a requirements.txt so that we get better version control? llvm/utils/git/requirements.txt would work I think.

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 wondering if we can set this up to trigger on dependency workflow/actions changing like we've done with other jobs to catch regressions earlier. It might need some restructuring though with the permissions check.

I'm also wondering if we're able to get rid of the cache filling stage now that double the cores are available on the free runners? Might reduce some complexity that isn't needed now.

Both of those are follow up patches though and can be addressed later.

@tstellar
Copy link
Collaborator Author

tstellar commented Mar 8, 2024

LGTM.

I'm wondering if we can set this up to trigger on dependency workflow/actions changing like we've done with other jobs to catch regressions earlier. It might need some restructuring though with the permissions check.

I can look into this.

I'm also wondering if we're able to get rid of the cache filling stage now that double the cores are available on the free runners? Might reduce some complexity that isn't needed now.

The free runners still aren't powerful enough to do the release builds in less than 6 hours, so we have to keep using the non-free builders for this. The cache filling stage sill saves us money, so I think we have to keep it.

@boomanaiden154
Copy link
Contributor

The free runners still aren't powerful enough to do the release builds in less than 6 hours, so we have to keep using the non-free builders for this. The cache filling stage sill saves us money, so I think we have to keep it.

Ah. Didn't realize that. Keeping it around makes sense then.

@tstellar tstellar merged commit 5120775 into llvm:main Mar 8, 2024
tstellar added a commit to tstellar/llvm-project that referenced this pull request May 4, 2024
Since aa02002 we weren't installing the
correct dependencies, and since 2836d8e
we must pass a custom token to github-upload-release.py for verifying
permissions.

(cherry picked from commit 5120775)
tstellar added a commit to tstellar/llvm-project that referenced this pull request May 9, 2024
Since aa02002 we weren't installing the
correct dependencies, and since 2836d8e
we must pass a custom token to github-upload-release.py for verifying
permissions.

(cherry picked from commit 5120775)
Tedlion pushed a commit to Tedlion/llvm-project that referenced this pull request Jun 15, 2025
Since aa02002 we weren't installing the
correct dependencies, and since 2836d8e
we must pass a custom token to github-upload-release.py for verifying
permissions.

(cherry picked from commit 5120775)
Tedlion pushed a commit to Tedlion/llvm-project that referenced this pull request Jun 15, 2025
Since aa02002 we weren't installing the
correct dependencies, and since 2836d8e
we must pass a custom token to github-upload-release.py for verifying
permissions.

(cherry picked from commit 5120775)
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