-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Hoist benchmarking steps into reusable GH action
Signed-off-by: Hanno Becker <[email protected]> Signed-off-by: Ry Jones <[email protected]>
- Loading branch information
1 parent
c1d5109
commit 19543cf
Showing
3 changed files
with
72 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
name: Bench MLKEM-C-AArch64 | ||
description: Run benchmarking script | ||
|
||
inputs: | ||
name: | ||
description: Name for the benchmarking run | ||
required: true | ||
perf: | ||
description: Method of obtaining PMU metrics | ||
required: true | ||
default: 'PERF' | ||
type: choice | ||
options: | ||
- NO | ||
- PERF | ||
- PMU | ||
- M1 | ||
cflags: | ||
description: CFLAGS to pass to compilation | ||
required: true | ||
archflags: | ||
description: ARCHFLAGS to pass to compilation | ||
required: true | ||
bench_extra_args: | ||
description: Further arguments to be appended to command line for `bench` script | ||
required: false | ||
default: '' | ||
store_results: | ||
description: Whether to push results to GH pages | ||
required: true | ||
default: 'false' | ||
gh_token: | ||
description: GitHub access token | ||
required: true | ||
runs: | ||
using: composite | ||
steps: | ||
- name: Run benchmark | ||
shell: nix develop .#ci -c bash -e {0} | ||
run: | | ||
tests bench -c ${{ inputs.perf }} --cflags "${{ inputs.cflags }}" --arch-flags "${{ inputs.archflags }}" -v --output output.json ${{ inputs.bench_extra_args }} | ||
- name: Dump benchmark | ||
shell: nix develop .#ci -c bash -e {0} | ||
if: ${{ inputs.store_results != 'true' }} | ||
run: | | ||
cat output.json | ||
- name: Store benchmark result | ||
if: ${{ inputs.store_results == 'true' }} | ||
uses: benchmark-action/github-action-benchmark@v1 | ||
with: | ||
name: ${{ inputs.name }} | ||
tool: 'customSmallerIsBetter' | ||
output-file-path: output.json | ||
github-token: ${{ inputs.gh_token }} | ||
auto-push: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters