[llvm] [libc++] Add link to the running job from the benchmarking bot (PR #180217)
Louis Dionne via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 13 13:58:06 PST 2026
https://github.com/ldionne updated https://github.com/llvm/llvm-project/pull/180217
>From a9cbea434e5a06e391605e77bc4cc4c5032e4c59 Mon Sep 17 00:00:00 2001
From: Louis Dionne <ldionne.2 at gmail.com>
Date: Fri, 6 Feb 2026 10:28:21 -0500
Subject: [PATCH 1/3] [libc++] Add link to the running job from the
benchmarking bot
This allows following the progress of the benchmarking job and
also spotting when it fails.
Fixes #158296
---
.github/workflows/libcxx-run-benchmarks.yml | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/.github/workflows/libcxx-run-benchmarks.yml b/.github/workflows/libcxx-run-benchmarks.yml
index c686a3b735a2b..324da8e567d31 100644
--- a/.github/workflows/libcxx-run-benchmarks.yml
+++ b/.github/workflows/libcxx-run-benchmarks.yml
@@ -56,6 +56,18 @@ jobs:
BENCHMARKS=$(echo "$COMMENT_BODY" | sed -nE 's/\/libcxx-bot benchmark (.+)/\1/p')
echo "benchmarks=${BENCHMARKS}" >> ${GITHUB_OUTPUT}
+ - name: Update comment with link to the job
+ run: |
+ source .venv/bin/activate && cd repo
+ cat <<EOF | python
+ import github
+ repo = github.Github(auth=github.Auth.Token("${{ github.token }}")).get_repo("${{ github.repository }}")
+ pr = repo.get_pull(${{ github.event.issue.number }})
+ comment = pr.get_issue_comment(${{ github.event.comment.id }})
+ add_text = "> _Running benchmarks in ${{ env.GITHUB_SERVER_URL }}/${{ env.GITHUB_REPOSITORY }}/actions/runs/${{ env.GITHUB_RUN_ID }}/job/${{ env.GITHUB_JOB }}_"
+ comment.edit('\n\n'.join([comment.body, add_text]))
+ EOF
+
- uses: actions/checkout at 8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
ref: ${{ steps.vars.outputs.pr_head }}
>From 6bfc102588bf9eec49624a04d096e6dd25b893ed Mon Sep 17 00:00:00 2001
From: Louis Dionne <ldionne.2 at gmail.com>
Date: Fri, 6 Feb 2026 10:53:45 -0500
Subject: [PATCH 2/3] Also refactor setting up the virtual environment as a
drive-by, and don't (incorrectly) cd into non-existent repo
---
.github/workflows/libcxx-run-benchmarks.yml | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/libcxx-run-benchmarks.yml b/.github/workflows/libcxx-run-benchmarks.yml
index 324da8e567d31..f3641a10aca0d 100644
--- a/.github/workflows/libcxx-run-benchmarks.yml
+++ b/.github/workflows/libcxx-run-benchmarks.yml
@@ -37,15 +37,18 @@ jobs:
with:
python-version: '3.14'
+ - name: Setup virtual environment
+ run: |
+ python3 -m venv .venv
+ source .venv/bin/activate
+ python -m pip install pygithub
+
- name: Extract information from the PR
id: vars
env:
COMMENT_BODY: ${{ github.event.comment.body }}
run: |
- python3 -m venv .venv
source .venv/bin/activate
- python -m pip install pygithub
-
cat <<EOF | python >> ${GITHUB_OUTPUT}
import github
repo = github.Github(auth=github.Auth.Token("${{ github.token }}")).get_repo("${{ github.repository }}")
@@ -58,7 +61,7 @@ jobs:
- name: Update comment with link to the job
run: |
- source .venv/bin/activate && cd repo
+ source .venv/bin/activate
cat <<EOF | python
import github
repo = github.Github(auth=github.Auth.Token("${{ github.token }}")).get_repo("${{ github.repository }}")
>From 5eeeccfa2051d6f7e56d68ba077a632327a0f7e1 Mon Sep 17 00:00:00 2001
From: Louis Dionne <ldionne.2 at gmail.com>
Date: Fri, 13 Feb 2026 16:57:43 -0500
Subject: [PATCH 3/3] Pin the version of pygithub
---
.github/workflows/libcxx-run-benchmarks.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/libcxx-run-benchmarks.yml b/.github/workflows/libcxx-run-benchmarks.yml
index f3641a10aca0d..8fe650bd77580 100644
--- a/.github/workflows/libcxx-run-benchmarks.yml
+++ b/.github/workflows/libcxx-run-benchmarks.yml
@@ -41,7 +41,7 @@ jobs:
run: |
python3 -m venv .venv
source .venv/bin/activate
- python -m pip install pygithub
+ python -m pip install pygithub==2.8.1
- name: Extract information from the PR
id: vars
More information about the llvm-commits
mailing list