[libcxx-commits] [libcxx] [llvm] [libc++] Extract running the benchmarks into reusable workflows (PR #232168)
via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Oct 14 20:14:25 PDT 2026
================
@@ -1,70 +1,50 @@
-# This file defines a workflow that runs the libc++ benchmarks against the specified version
-# of libstdc++ and (optionally) submits the results to a LNT instance.
+# This file defines a reusable workflow that runs the libc++ benchmarks against the given version of
+# libstdc++, using the given machine setup, and uploads the resulting LNT report as an artifact.
-name: "[libc++] Run benchmark suite against libstdc++"
+name: "[libc++] Run benchmarks against libstdc++"
permissions:
contents: read
on:
- workflow_dispatch:
+ workflow_call:
inputs:
libstdcxx-version:
description: 'The version of libstdc++ to benchmark. This is the major version of GCC being installed to get libstdc++ (e.g. 16).'
required: true
type: string
lnt-machine:
- description: 'The LNT machine configuration to use when benchmarking and to report results as'
+ description: 'The name of the LNT machine to report the results as'
required: true
type: string
- benchmark-suite-override:
- description: |
- Override the version of the benchmark suite to use (a LLVM monorepo SHA). By default, the version pinned
- for this machine in machines.json is used. This override can be used to dry-run benchmarks with arbitrary
- commits of the benchmark suite, but only the version pinned in machines.json can be used when actually
- submitting to LNT.
- required: false
+ setup:
+ description: 'The setup of the machine to benchmark on, as a JSON object (see libcxx/utils/ci/lnt/README.md)'
+ required: true
type: string
filter:
description: 'An optional filter to determine which benchmarks to run'
required: false
type: string
- submit-lnt:
- description: 'Whether to submit the results to LNT -- dry-run unless opted in'
- required: false
- type: boolean
- default: false
- lnt-url:
- description: 'The URL of the LNT instance to submit to'
- required: false
+ artifact-name:
+ description: 'The name of the artifact to upload the LNT report as'
+ required: true
type: string
- default: https://lnt.llvm.org
jobs:
- # Validate the inputs and select the configuration of the machine to benchmark on.
- validate:
- uses: $/.github/workflows/libcxx-lnt-validate.yml
- with:
- lnt-machine: ${{ inputs.lnt-machine }}
- benchmark-suite-override: ${{ inputs.benchmark-suite-override }}
- submit-lnt: ${{ inputs.submit-lnt }}
-
run-benchmarks:
name: Run benchmarks on ${{ inputs.lnt-machine }}
- needs:
- - validate
- runs-on: ${{ fromJSON(needs.validate.outputs.setup).runner }}
- container: ${{ fromJSON(needs.validate.outputs.setup).container || null }}
+ runs-on: ${{ fromJSON(inputs.setup).runner }}
+ container: ${{ fromJSON(inputs.setup).container || null }}
----------------
github-advanced-security[bot] wrote:
## zizmor /
unpinned image references: container image may be unpinned
[Show more details](https://github.com/llvm/llvm-project/security/code-scanning/2431)
https://github.com/llvm/llvm-project/pull/232168
More information about the libcxx-commits
mailing list