From 26a949df85a1f9577e8080e19f2196c8a3db17ec Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Sun, 17 Oct 2021 16:58:00 +0530 Subject: [PATCH] Add manual workflow to run benchmarks [skip ci] --- .github/workflows/benchmark.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/benchmark.yml diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml new file mode 100644 index 00000000..61991d3c --- /dev/null +++ b/.github/workflows/benchmark.yml @@ -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 }}"