Skip to content

Commit

Permalink
CI: Make commit and storage of results flexible in ad-hoc bench flow
Browse files Browse the repository at this point in the history
This commit generalizes the manually triggerable benchmarking workflow
`bench_ec2_any.yml` to allow an arbitary commit hash. It also allows to
specify whether the benchmark results should be pushed to mlkem-native's
GH pages repository.

Due to the maximum of 10 configuration options in a manually triggered
workflow, we have to remove the `ec2_ami` and `archflags` options.
This is only a restriction in convenience, not generality, since archflags
is subsumed by cflags, and the ec2_ami can still be specified manually.

Signed-off-by: Hanno Becker <[email protected]>
  • Loading branch information
hanno-becker committed Nov 16, 2024
1 parent a4580f7 commit 0704378
Showing 1 changed file with 12 additions and 15 deletions.
27 changes: 12 additions & 15 deletions .github/workflows/bench_ec2_any.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,19 @@ on:
name:
description: Alternative name of instance
default: Graviton2
ref:
description: reference to commit to benchmark
default: ''
ec2_instance_type:
description: Type if EC2 instance to benchmark on
default: t4g.small
ec2_ami:
description: AMI ID
type: choice
options:
- ubuntu-latest (x86_64)
- ubuntu-latest (aarch64)
- ubuntu-latest (custom AMI)
default: ubuntu-latest (aarch64)
ec2_ami_id:
description: AMI ID
required: false
description: "AMI ID (x86_64 default: ami-0e86e20dae9224db8 | aarch64 default: ami-096ea6a12ea24a797)"
required: true
default: ami-096ea6a12ea24a797
cflags:
description: Custom CFLAGS for compilation
default:
archflags:
description: Custom ARCH flags for compilation
default: ''
opt:
description: Run with optimized code if enabled
type: boolean
Expand All @@ -43,6 +35,10 @@ on:
additional_packages:
description: Additional packages to install when custom compiler is used.
default: ''
store_results:
description: Push benchmarking result to GH pages
type: boolean
default: false
jobs:
bench-ec2-any:
name: Ad-hoc benchmark on $${{ inputs.ec2_instance_type }}
Expand All @@ -52,13 +48,14 @@ jobs:
uses: ./.github/workflows/bench_ec2_reusable.yml
with:
ec2_instance_type: ${{ inputs.ec2_instance_type }}
ec2_ami: ${{ inputs.ec2_ami }}
ec2_ami: "ubuntu-latest (custom AMI)"
ec2_ami_id: ${{ inputs.ec2_ami_id }}
cflags: ${{ inputs.cflags }}
archflags: ${{ inputs.archflags }}
opt: ${{ inputs.opt }}
ref: ${{ inputs.ref }}
name: ${{ inputs.name }}
store_results: false
store_results: ${{ inputs.store_results }}
bench_extra_args: ${{ inputs.bench_extra_args }}
compiler: ${{ inputs.compiler }}
additional_packages: ${{ inputs.additional_packages }}
Expand Down

0 comments on commit 0704378

Please sign in to comment.