diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 490c7047c..db4acd133 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -8,6 +8,12 @@ on: paths-ignore: ["*.md", "*.png", "*.svg", "LICENSE-*"] merge_group: workflow_dispatch: + inputs: + run_benchmarks: + description: 'Run benchmarks' + type: boolean + required: false + default: false env: CARGO_TERM_COLOR: always RUST_BACKTRACE: 1 @@ -99,4 +105,8 @@ jobs: bench: needs: [check] + if: > + (github.event_name == 'workflow_dispatch' && github.event.inputs.run_benchmarks) || + (github.event_name == 'pull_request' && !github.event.pull_request.draft) || + (github.event_name != 'workflow_dispatch' && github.event_name != 'pull_request') uses: ./.github/workflows/bench.yml