Skip to content

Commit

Permalink
allow benchmark dry-runs in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
OmarTawfik committed Jan 9, 2025
1 parent 3936e23 commit e5bb3c2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@ name: "benchmark"
on:
# Run using manual triggers from GitHub UI:
# https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow
workflow_dispatch: {}
workflow_dispatch:
inputs:
dryRun:
description: "Attempt a local run and report results, without publishing any user-facing changes."
type: "boolean"
required: true
default: true

# Run on pushes to 'main' branch:
push:
Expand Down Expand Up @@ -48,7 +54,7 @@ jobs:
- name: "infra perf benchmark"
uses: "./.github/actions/devcontainer/run"
with:
runCmd: "./scripts/bin/infra perf benchmark"
runCmd: "./scripts/bin/infra perf benchmark ${{ inputs.dryRun === true ? '--dry-run' || '' }}"
env: |
BENCHER_API_TOKEN=${{ secrets.BENCHER_API_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion crates/infra/cli/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ impl<T: ValueEnum> ClapExtensions for T {

#[derive(Clone, Copy, Debug, Parser)]
pub struct DryRun {
/// Attempt a dry run, instead of actually executing the command.
/// Attempt a local run and report results, without publishing any user-facing changes.
#[arg(long)]
dry_run: bool,
}
Expand Down

0 comments on commit e5bb3c2

Please sign in to comment.