name: Benchmark
permissions: {}
on:
workflow_dispatch:
pull_request:
types: [opened, synchronize]
paths:
- '**/*.rs'
- 'Cargo.lock'
- '.github/workflows/benchmark.yml'
push:
branches:
- main
paths:
- '**/*.rs'
- 'Cargo.lock'
- '.github/workflows/benchmark.yml'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
jobs:
benchmark:
name: Benchmark
runs-on: ubuntu-latest
permissions:
id-token: write steps:
- uses: taiki-e/checkout-action@7d1e50e93dc4fb3bba58f85018fadf77898aee8b
- uses: oxc-project/setup-rust@23f38cfb0c04af97a055f76acee94d5be71c7c82 with:
cache-key: benchmark
save-cache: ${{ github.ref_name == 'main' }}
tools: cargo-codspeed
- name: Build benchmark
run: cargo codspeed build --features codspeed
- name: Run benchmark
uses: CodSpeedHQ/action@db35df748deb45fdef0960669f57d627c1956c30 timeout-minutes: 15
with:
run: cargo codspeed run
mode: instrumentation