[libcxx-commits] [libcxx] 850fd86 - [libc++] Switch the libc++ benchmark pipelines to LNT v5 (#232888)
via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Oct 16 11:49:16 PDT 2026
Author: Louis Dionne
Date: 2026-10-16T14:49:08-04:00
New Revision: 850fd86b140c622027eef26b1fca262f6e493487
URL: https://github.com/llvm/llvm-project/commit/850fd86b140c622027eef26b1fca262f6e493487
DIFF: https://github.com/llvm/llvm-project/commit/850fd86b140c622027eef26b1fca262f6e493487.diff
LOG: [libc++] Switch the libc++ benchmark pipelines to LNT v5 (#232888)
Since lnt.llvm.org is now running LNT v5, switch the benchmark pipelines
over to it. Note that we hardcode the submission URL now because
submitting requires an API key, so allowing the submission workflows to
submit to another instance would allow leaking that token.
Added:
Modified:
.github/workflows/libcxx-benchmark-cron.yml
.github/workflows/libcxx-lnt-pipeline-libstdcxx.yml
.github/workflows/libcxx-lnt-pipeline.yml
.github/workflows/libcxx-lnt-submit.yml
.github/workflows/libcxx-run-benchmarks.yml
.github/workflows/libcxx-run-libstdcxx-benchmarks.yml
libcxx/utils/ci/lnt/dispatch-benchmarks
libcxx/utils/ci/lnt/machines.json
Removed:
################################################################################
diff --git a/.github/workflows/libcxx-benchmark-cron.yml b/.github/workflows/libcxx-benchmark-cron.yml
index 386966604252a..c59135d836887 100644
--- a/.github/workflows/libcxx-benchmark-cron.yml
+++ b/.github/workflows/libcxx-benchmark-cron.yml
@@ -80,7 +80,8 @@ jobs:
EVERY: ${{ matrix.every }}
SAMPLES: ${{ matrix.samples }}
MAX_IN_FLIGHT: ${{ matrix.max-in-flight }}
- LNT_URL: ${{ matrix.lnt-url }}
+ # Keep in sync with libcxx-lnt-submit.yml
+ LNT_URL: https://lnt.llvm.org
DRY_RUN: ${{ inputs.dry-run || 'false' }}
steps:
@@ -158,5 +159,4 @@ jobs:
dry_run=(--dry-run)
fi
- libcxx/utils/ci/lnt/dispatch-benchmarks --work-items plan.jsonl --lnt-url "${LNT_URL}" \
- --max-in-flight "${MAX_IN_FLIGHT}" "${dry_run[@]}"
+ libcxx/utils/ci/lnt/dispatch-benchmarks --work-items plan.jsonl --max-in-flight "${MAX_IN_FLIGHT}" "${dry_run[@]}"
diff --git a/.github/workflows/libcxx-lnt-pipeline-libstdcxx.yml b/.github/workflows/libcxx-lnt-pipeline-libstdcxx.yml
index 4fabb2b7d57b7..7f970bc7d186e 100644
--- a/.github/workflows/libcxx-lnt-pipeline-libstdcxx.yml
+++ b/.github/workflows/libcxx-lnt-pipeline-libstdcxx.yml
@@ -36,11 +36,6 @@ on:
required: false
type: boolean
default: false
- lnt-url:
- description: 'The URL of the LNT instance to submit to'
- required: false
- type: string
- default: https://lnt.llvm.org
jobs:
# Validate the inputs and select the configuration of the machine to benchmark on.
@@ -70,4 +65,3 @@ jobs:
with:
artifact-name: lnt-report
test-suite: libstdcxx
- lnt-url: ${{ inputs.lnt-url }}
diff --git a/.github/workflows/libcxx-lnt-pipeline.yml b/.github/workflows/libcxx-lnt-pipeline.yml
index 9b32a7fa491f7..74cd0c58f62cb 100644
--- a/.github/workflows/libcxx-lnt-pipeline.yml
+++ b/.github/workflows/libcxx-lnt-pipeline.yml
@@ -38,11 +38,6 @@ on:
required: false
type: boolean
default: false
- lnt-url:
- description: 'The URL of the LNT instance to submit to'
- required: false
- type: string
- default: https://lnt.llvm.org
jobs:
# Validate the inputs and select the configuration of the machine to benchmark on.
@@ -72,4 +67,3 @@ jobs:
with:
artifact-name: lnt-report
test-suite: libcxx
- lnt-url: ${{ inputs.lnt-url }}
diff --git a/.github/workflows/libcxx-lnt-submit.yml b/.github/workflows/libcxx-lnt-submit.yml
index 0fbf4fc2418d2..4669ffa5863e7 100644
--- a/.github/workflows/libcxx-lnt-submit.yml
+++ b/.github/workflows/libcxx-lnt-submit.yml
@@ -1,5 +1,5 @@
# This file defines a reusable workflow that submits the LNT reports contained in an artifact
-# of the current workflow run to a LNT instance.
+# of the current workflow run to our LNT instance.
#
# This allows separating concerns around submission (e.g. access tokens) and generating the
# actual benchmarking data.
@@ -20,14 +20,18 @@ on:
description: 'The LNT test suite to submit to'
required: true
type: string
- lnt-url:
- description: 'The URL of the LNT instance to submit to'
- required: true
- type: string
jobs:
submit:
runs-on: ubuntu-26.04
+ # This environment stores the token used to submit to LNT. Using an environment makes the token
+ # available in this job only.
+ environment:
+ name: lnt
+ deployment: false
+ env:
+ # Keep in sync with libcxx-benchmark-cron.yml.
+ LNT_URL: https://lnt.llvm.org
steps:
- name: Checkout the LNT tooling
uses: actions/checkout at 3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
@@ -39,11 +43,6 @@ jobs:
uses: actions/setup-python at 5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: '3.14'
- cache: pip
- cache-dependency-path: libcxx/utils/ci/lnt/requirements.txt
-
- - name: Install dependencies
- run: pip install -r libcxx/utils/ci/lnt/requirements.txt
- name: Download the LNT reports
uses: actions/download-artifact at 9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
@@ -54,7 +53,7 @@ jobs:
- name: Submit to LNT
env:
ARTIFACT_NAME: ${{ inputs.artifact-name }}
- LNT_URL: ${{ inputs.lnt-url }}
+ LNT_TOKEN: ${{ secrets.LNT_SUBMISSION_TOKEN }}
TEST_SUITE: ${{ inputs.test-suite }}
run: |
shopt -s nullglob
diff --git a/.github/workflows/libcxx-run-benchmarks.yml b/.github/workflows/libcxx-run-benchmarks.yml
index 7872fdd229e77..f176acf0733a0 100644
--- a/.github/workflows/libcxx-run-benchmarks.yml
+++ b/.github/workflows/libcxx-run-benchmarks.yml
@@ -81,12 +81,6 @@ jobs:
"${COMPILER}" --version
python3 --version
- - name: Setup virtual environment
- run: |
- python3 -m venv .venv
- source .venv/bin/activate
- pip install -r libcxx/utils/ci/lnt/requirements.txt
-
# Build the library.
#
# A build failure is tolerated on purpose, since the library doesn't build at every historical commit.
@@ -119,7 +113,6 @@ jobs:
keepalive=$!
trap 'kill ${keepalive}' EXIT
- source .venv/bin/activate
filter_arg=()
if [ -n "${FILTER}" ]; then
filter_arg=(--filter "${FILTER}")
@@ -145,6 +138,8 @@ jobs:
--compiler "${COMPILER}" \
--benchmark-commit "${COMMIT}" \
--test-config "${TEST_CONFIG}" \
+ --run-parameter "library_build=${LIBRARY_BUILD}" \
+ --run-parameter "ci_run=${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}" \
"${filter_arg[@]}" \
--output "${COMMIT}.json" \
-- "${lit_params[@]}" --param "libcxx_installation=${INSTALL_DIR}"
diff --git a/.github/workflows/libcxx-run-libstdcxx-benchmarks.yml b/.github/workflows/libcxx-run-libstdcxx-benchmarks.yml
index 0ba4ee59420c3..52060e4ca7336 100644
--- a/.github/workflows/libcxx-run-libstdcxx-benchmarks.yml
+++ b/.github/workflows/libcxx-run-libstdcxx-benchmarks.yml
@@ -78,12 +78,6 @@ jobs:
"${COMPILER}" --version
python3 --version
- - name: Setup virtual environment
- run: |
- python3 -m venv .venv
- source .venv/bin/activate
- pip install -r libcxx/utils/ci/lnt/requirements.txt
-
- name: Run the benchmarks
env:
FILTER: ${{ inputs.filter }}
diff --git a/libcxx/utils/ci/lnt/dispatch-benchmarks b/libcxx/utils/ci/lnt/dispatch-benchmarks
index c1eebfa3548ef..0a1995dae8c41 100755
--- a/libcxx/utils/ci/lnt/dispatch-benchmarks
+++ b/libcxx/utils/ci/lnt/dispatch-benchmarks
@@ -259,22 +259,18 @@ def decide(items: Sequence[common.WorkItem],
def workflow_inputs(args: argparse.Namespace, item: common.WorkItem) -> Dict[str, str]:
"""Return the inputs to dispatch the workflow with for a work item."""
- inputs = {'commit': item.commit,
- 'lnt-machine': item.machine,
- # Submitting to LNT is mandatory, since a run whose results are not recorded
- # anywhere would be requested again on every future invocation. When run
- # with --dry-run, this tool never actually dispatches the workflow with
- # `submit-lnt: false`.
- 'submit-lnt': 'false' if args.dry_run else 'true'}
- if args.lnt_url:
- inputs['lnt-url'] = args.lnt_url
- return inputs
+ return {'commit': item.commit,
+ 'lnt-machine': item.machine,
+ # Submitting to LNT is mandatory, since a run whose results are not recorded
+ # anywhere would be requested again on every future invocation. When run
+ # with --dry-run, this tool never actually dispatches the workflow with
+ # `submit-lnt: false`.
+ 'submit-lnt': 'false' if args.dry_run else 'true'}
def report(args: argparse.Namespace, decisions: Sequence[Decision], runs: Runs) -> None:
"""Print a human-readable summary of what is about to be done."""
out = sys.stderr
- print(f'Submitting to: {args.lnt_url or "whatever the workflow defaults to"}', file=out)
# One line per machine the plan is about, since capacity is per machine.
for machine in sorted({d.item.machine for d in decisions}):
in_flight = runs.in_flight_on(machine)
@@ -331,9 +327,6 @@ def main(argv: List[str]) -> int:
'before it is given up on. This bounds the cost of a job that keeps dying before it '
'can submit, since such a run leaves no trace in LNT and would otherwise be requested '
'forever. It is counted per machine.')
- parser.add_argument('--lnt-url', type=str, required=False,
- help='The LNT instance the runs should submit to. By default the workflow submits to '
- 'whichever instance it defaults to.')
parser.add_argument('--token', type=str, required=False, # no default to avoid printing the token in --help
help='A Github token with write access to the repository, which is needed both to look at '
'the existing runs and to request new ones. Defaults to the GITHUB_TOKEN environment '
diff --git a/libcxx/utils/ci/lnt/machines.json b/libcxx/utils/ci/lnt/machines.json
index 35ff701790902..3c4deec2efa05 100644
--- a/libcxx/utils/ci/lnt/machines.json
+++ b/libcxx/utils/ci/lnt/machines.json
@@ -15,8 +15,7 @@
"since": "2023-01-01",
"every": "week",
"samples": 3,
- "max-in-flight": 4,
- "lnt-url": "https://lnt.llvm.org"
+ "max-in-flight": 4
}
},
{
@@ -35,8 +34,7 @@
"since": "2023-12-01",
"every": "week",
"samples": 3,
- "max-in-flight": 4,
- "lnt-url": "https://lnt.llvm.org"
+ "max-in-flight": 4
}
},
{
@@ -55,8 +53,7 @@
"since": "2023-01-01",
"every": "week",
"samples": 3,
- "max-in-flight": 8,
- "lnt-url": "https://lnt.llvm.org"
+ "max-in-flight": 8
}
},
{
More information about the libcxx-commits
mailing list