Skip to content

[llvm][release] Add links to commonly used release packages #147719

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 4 commits into from
Jul 29, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/release-tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,31 @@ jobs:
# Called workflows don't have access to secrets by default, so we need to explicitly pass secrets that we use.
secrets:
RELEASE_TASKS_USER_TOKEN: ${{ secrets.RELEASE_TASKS_USER_TOKEN }}

uncomment-download-links:
name: Uncomment download links
runs-on: ubuntu-24.04
permissions:
contents: write # For updating the release message.
needs:
- validate-tag
- release-create
- release-binaries

steps:
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install python3-github

- name: Checkout LLVM
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
sparse-checkout: llvm/utils/release/github-upload-release.py
sparse-checkout-cone-mode: false

- name: Uncomment Download Links
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
./llvm/utils/release/./github-upload-release.py --token "$GITHUB_TOKEN" --release ${{ needs.validate-tag.outputs.release-version }} uncomment_download_links
49 changes: 47 additions & 2 deletions llvm/utils/release/github-upload-release.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,26 @@ def create_release(repo, release, tag=None, name=None, message=None):
# Note that these lines are not length limited because if we do so, GitHub
# assumes that should be how it is laid out on the page. We want GitHub to
# do the reflowing for us instead.
#
# Once all the atuomatic binary builds have completed, the HTML comments
# in the text below will be removed to reveal the download links.
message = dedent(
"""\
LLVM {release} Release
## LLVM {release} Release

<!-- DOWNLOAD_LINKS_BEGIN
**Linux:**
* [x86_64](https://github.com/llvm/llvm-project/releases/download/llvmorg-{release}/LLVM-{release}-Linux-X64.tar.xz) ([signature](https://github.com/llvm/llvm-project/releases/download/llvmorg-{release}/LLVM-{release}-Linux-X64.tar.xz.jsonl))
* [Arm64](https://github.com/llvm/llvm-project/releases/download/llvmorg-{release}/LLVM-{release}-Linux-ARM64.tar.xz) ([signature](https://github.com/llvm/llvm-project/releases/download/llvmorg-{release}/LLVM-{release}-Linux-ARM64.tar.xz.jsonl))

**macOS:**
* [Apple Silicon](https://github.com/llvm/llvm-project/releases/download/llvmorg-{release}/LLVM-{release}-macOS-ARM64.tar.xz) (ARM64) ([signature](https://github.com/llvm/llvm-project/releases/download/llvmorg-{release}/LLVM-{release}-macOS-ARM64.tar.xz.jsonl))
* [Intel](https://github.com/llvm/llvm-project/releases/download/llvmorg-{release}/LLVM-{release}-macOS-X64.tar.xz) (x86-64) ([signature](https://github.com/llvm/llvm-project/releases/download/llvmorg-{release}/LLVM-{release}-macOS-X64.tar.xz.jsonl))
DOWNLOAD_LINKS_END -->

Download links for Linux and macOS will appear here when all the builds have completed. <!-- DOWNLOAD_LINKS_PLACEHOLDER -->

For Windows, and any other variants of platform and architecture, check the full list of release packages at the bottom of this release page.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Was there a reason we couldn't make neat links for windows?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We can make neat links but I was being conservative and only adding the things we build automatically. As we know that those links will always become valid, and we know when because there is a workflow handling that.

I can add links that release uploaders to manually reveal, and change this disclaimer text to just be "any other variants".

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Also I didn't want to give release uploaders more jobs without asking, but the worst that happens is the links remain hidden.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'll add the links and you can see what you think.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I've added links for the hand built packages, to be uncommented once they're uploaded.

I discovered that nesting HTML comments isn't a great idea, so I've changed the formatting to repeat the platform name on each line like "Linux x86", "Linux AArch64" etc. This means you can reveal just one line and it still makes sense.

I moved the pointer to the forum up higher, because I think people should know that earlier.

Removed the note about installers vs. archives for Windows because it was a pain to fit in, and the actual text it refers to is only a few lines below anyway. If people are still not finding it, we can improve that later.

Copy link
Collaborator Author

@DavidSpickett DavidSpickett Jul 18, 2025

Choose a reason for hiding this comment

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

In the comment below is the final links after all comments get removed. So this would be once automatic builds are done and all the release uploaders have done their bits. I've checked that it renders the same here in a comment as on the release page.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

LLVM {release} Release

For any other variants of platform and architecture, check the full list of release packages at the bottom of this release page. If you do not find a release package for your platform, you may be able to find a community built package on the LLVM Discourse forum thread for this release. Remember that these are built by volunteers and may not always be available. If you rely on a platform or configuration that is not one of the defaults, we suggest you use the binaries that your platform provides, or build your own release packages.


## Package Types

Expand Down Expand Up @@ -95,9 +112,35 @@ def upload_files(repo, release, files):
print("Done")


def uncomment_download_links(repo, release):
release = repo.get_release("llvmorg-{}".format(release))

new_message = []
to_remove = [
"DOWNLOAD_LINKS_BEGIN",
"DOWNLOAD_LINKS_END",
"DOWNLOAD_LINKS_PLACEHOLDER",
]
for line in release.body.splitlines():
for comment in to_remove:
if comment in line:
break
else:
new_message.append(line)

release.update_release(
name=release.title,
message="\n".join(new_message),
draft=release.draft,
prerelease=release.prerelease,
)


parser = argparse.ArgumentParser()
parser.add_argument(
"command", type=str, choices=["create", "upload", "check-permissions"]
"command",
type=str,
choices=["create", "upload", "check-permissions", "uncomment_download_links"],
)

# All args
Expand Down Expand Up @@ -137,3 +180,5 @@ def upload_files(repo, release, files):
create_release(llvm_repo, args.release)
if args.command == "upload":
upload_files(llvm_repo, args.release, args.files)
if args.command == "uncomment_download_links":
uncomment_download_links(llvm_repo, args.release)
Loading