Skip to content

Commit

Permalink
Add a workflow input for running benchmarks manually
Browse files Browse the repository at this point in the history
  • Loading branch information
jleibs committed Mar 23, 2023
1 parent 1802c20 commit 8296230
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ on:
required: true
default: false
type: boolean
force_run_benchmarks:
description: "Run the rust benchmarks"
required: true
default: false
type: boolean

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }} # Cancel previous CI jobs on the same branch
Expand All @@ -37,7 +42,7 @@ jobs:
name: Rust Criterion benchmarks

# Only save the rs-benchmarks job when a commit gets pushed to main
if: ${{ github.event_name == 'push' }}
if: ${{ github.event_name == 'push' }} || github.event.inputs.force_update_web_build

runs-on: ubuntu-latest-16-cores
container:
Expand Down Expand Up @@ -71,6 +76,7 @@ jobs:
-- --output-format=bencher | tee output.txt
- name: Store benchmark result
if: ${{ github.event_name == 'push' }}
uses: benchmark-action/github-action-benchmark@v1
with:
name: Rust Benchmark
Expand Down

0 comments on commit 8296230

Please sign in to comment.