Add manual workflow to run benchmarks [skip ci]

This commit is contained in:
Ashwin Maroli 2021-10-17 16:58:00 +05:30 committed by GitHub
parent e1838db156
commit 26a949df85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 30 additions and 0 deletions

30
.github/workflows/benchmark.yml vendored Normal file
View File

@ -0,0 +1,30 @@
name: Micro Benchmark Runs
on:
workflow_dispatch:
inputs:
path:
description: "Path to benchmark script relative to 'benchmark' directory."
required: true
default: "capture-assign.rb"
ruby_version:
description: "Ruby version to use (via `ruby/setup-ruby@v1`) action."
required: false
default: "2.7"
jobs:
benchmark:
name: "Benchmark (${{ github.event.inputs.path }}) (Ruby ${{ github.event.inputs.ruby_version }})"
runs-on: "ubuntu-latest"
env:
BENCHMARK: true
steps:
- name: Checkout Jekyll
uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ github.event.inputs.ruby_version }}
bundler-cache: true
- name: Run Benchmark
run: "bundle exec ruby benchmark/${{ github.event.inputs.path }}"