Skip to content

ci: add benchmark

ci: add benchmark #2

Workflow file for this run

name: Benchmark
on:
workflow_dispatch:
pull_request:
types: [opened, synchronize]
paths:
- '**/*.rs'
- 'Cargo.lock'
- '.github/workflows/benchmark.yml'
push:
branches:
- main
- ci-benchmark
paths:
- '**/*.rs'
- 'Cargo.lock'
- '.github/workflows/benchmark.yml'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
defaults:
run:
shell: bash
jobs:
benchmark:
name: Benchmark

Check failure on line 30 in .github/workflows/benchmark.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/benchmark.yml

Invalid workflow file

You have an error in your yaml syntax on line 30
runs-on: ubuntu-latest
steps:
- uses: taiki-e/checkout-action@v1
- uses: Boshen/setup-rust@main
with:
cache-key: benchmark
save-cache: ${{ github.ref_name == 'main' }}
tools: cargo-codspeed
- name: Build benchmark
env:
RUSTFLAGS: "-C debuginfo=1 -C strip=none -g --cfg codspeed"
run: |
cargo build --release --bench resolve --features codspeed
mkdir -p target/codspeed/resolve
mv target/release/deps/resolve-* target/codspeed/resolve
rm target/codspeed/resolve/*.d
- name: Run benchmark
uses: CodSpeedHQ/action@v2
timeout-minutes: 30
with:
token: ${{ secrets.CODSPEED_TOKEN }}
run: cargo codspeed run