diff --git a/.github/actions/bench/action.yml b/.github/actions/bench/action.yml index 3f463bc9d..6ef1d5be8 100644 --- a/.github/actions/bench/action.yml +++ b/.github/actions/bench/action.yml @@ -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: @@ -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 diff --git a/.github/workflows/bench_ec2_any.yml b/.github/workflows/bench_ec2_any.yml index 6300e6a61..4cac76607 100644 --- a/.github/workflows/bench_ec2_any.yml +++ b/.github/workflows/bench_ec2_any.yml @@ -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 }} @@ -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 diff --git a/.github/workflows/bench_ec2_reusable.yml b/.github/workflows/bench_ec2_reusable.yml index 2e5a740a5..885cddf5f 100644 --- a/.github/workflows/bench_ec2_reusable.yml +++ b/.github/workflows/bench_ec2_reusable.yml @@ -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 @@ -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: