Skip to content

Benchmark

Benchmark #155

Workflow file for this run

name: Benchmark
on:
workflow_dispatch:
schedule:
- cron: '0 3 * * *'
jobs:
benchmark:
if: github.repository == 'poolifier/benchmark'
runs-on:
group: default
labels: [self-hosted, benchmark]
env:
BENCHER_PROJECT: poolifier-benchmark
BENCHER_API_TOKEN: ${{ secrets.BENCHER_API_TOKEN }}
BENCHER_ADAPTER: shell_hyperfine
BENCHER_TESTBED: self-hosted
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --ignore-scripts --frozen-lockfile
- uses: bencherdev/bencher@main
- name: Run benchmark
run: |
bencher run \
--if-branch "$GITHUB_REF_NAME" \
--else-if-branch "$GITHUB_BASE_REF" \
--else-if-branch master \
--hash "$GITHUB_SHA" \
--file BENCH-100000.json \
--err \
--github-actions ${{ secrets.GITHUB_TOKEN }} \
"./bench.sh"