Skip to content

Commit

Permalink
Make cross prefix configurable in benchmark action and workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Hanno Becker <[email protected]>
  • Loading branch information
hanno-becker committed Sep 12, 2024
1 parent 290e5b1 commit 83958c6
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/actions/bench/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,17 @@ inputs:
description: Whether to push results to GH pages
default: "false"
gh_token:
description: GitHub access token
required: true
description: GitHub access token
required: true
use-nix:
description: Whether to run in the default Nix environment
default: "true"
custom_shell:
description: The shell to use. Only relevant if use-nix is "false"
default: "bash"
cross_prefix:
description: "Binary prefix for cross-compilation builds"
default: ""
runs:
using: composite
steps:
Expand Down Expand Up @@ -62,7 +65,7 @@ runs:
- name: Run benchmark
shell: ${{ env.SHELL }}
run: |
tests bench -c ${{ inputs.perf }} --cflags="${{ inputs.cflags }}" --arch-flags="${{ inputs.archflags }}" --opt="${{ inputs.opt }}" -v --output=output.json ${{ inputs.bench_extra_args }}
tests bench -c ${{ inputs.perf }} --cross-prefix="${{ inputs.cross_prefix }}" --cflags="${{ inputs.cflags }}" --arch-flags="${{ inputs.archflags }}" --opt="${{ inputs.opt }}" -v --output=output.json ${{ inputs.bench_extra_args }}
- name: Store benchmark result
if: ${{ inputs.store_results }}
uses: benchmark-action/github-action-benchmark@v1
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/bench_ec2_any.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ on:
bench_extra_args:
description: Additional command line to be appended to `tests bench` script
default: ''
cross_prefix:
description: "Binary prefix for cross-compilation builds"
default: ""
jobs:
bench-ec2-any:
name: Ad-hoc benchmark on $${{ inputs.ec2_instance_type }}
Expand All @@ -58,4 +61,5 @@ jobs:
store_results: ${{ inputs.store_results }}
always_terminate: ${{ inputs.always_terminate }}
bench_extra_args: ${{ inputs.bench_extra_args }}
cross_prefix: ${{ inputs.cross_prefix }}
secrets: inherit
5 changes: 5 additions & 0 deletions .github/workflows/bench_ec2_reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ on:
type: string
description: Additional command line to be appended to `bench` script
default: ''
cross_prefix:
type: string
description: "Binary prefix for cross-compilation builds"
default: ""
env:
AWS_ROLE: arn:aws:iam::559050233797:role/mlkem-c-aarch64-gh-action
AWS_REGION: us-east-1
Expand Down Expand Up @@ -111,6 +115,7 @@ jobs:
store_results: ${{ inputs.store_results }}
bench_extra_args: ${{ inputs.bench_extra_args }}
gh_token: ${{ secrets.AWS_GITHUB_TOKEN }}
cross_prefix: ${{ inputs.cross_prefix }}
stop-ec2-runner:
name: Stop ${{ inputs.name }} (${{ inputs.ec2_instance_type }})
permissions:
Expand Down

0 comments on commit 83958c6

Please sign in to comment.