mirror of
https://github.com/salsa-rs/salsa.git
synced 2025-01-22 12:56:33 +00:00
Add codspeed
This commit is contained in:
parent
fc0a82bd10
commit
d18d8008e9
3 changed files with 42 additions and 2 deletions
40
.github/workflows/test.yml
vendored
40
.github/workflows/test.yml
vendored
|
@ -89,3 +89,43 @@ jobs:
|
|||
- name: Run examples with Miri
|
||||
run: |
|
||||
cargo miri run --example calc
|
||||
|
||||
benchmarks:
|
||||
name: Benchmarks
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Rust toolchain
|
||||
uses: dtolnay/rust-toolchain@master
|
||||
id: rust-toolchain
|
||||
with:
|
||||
toolchain: stable
|
||||
|
||||
- name: "Setup codspeed"
|
||||
uses: taiki-e/install-action@v2
|
||||
with:
|
||||
tool: cargo-codspeed
|
||||
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/bin/
|
||||
~/.cargo/registry/index/
|
||||
~/.cargo/registry/cache/
|
||||
~/.cargo/git/db/
|
||||
target/
|
||||
key: ${{ runner.os }}-cargo-${{ steps.rust-toolchain.outputs.cachekey }}-${{ hashFiles('**/Cargo.toml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-cargo-${{ steps.rust-toolchain.outputs.cachekey }}-
|
||||
${{ runner.os }}-cargo-
|
||||
|
||||
- name: "Build benchmarks"
|
||||
run: cargo codspeed build
|
||||
|
||||
- name: "Run benchmarks"
|
||||
uses: CodSpeedHQ/action@v2
|
||||
with:
|
||||
run: cargo codspeed run
|
||||
token: ${{ secrets.CODSPEED_TOKEN }}
|
||||
|
|
|
@ -24,7 +24,7 @@ smallvec = "1.0.0"
|
|||
|
||||
[dev-dependencies]
|
||||
annotate-snippets = "0.11.4"
|
||||
criterion = "0.5.1"
|
||||
codspeed-criterion-compat = { version = "2.6.0", default-features = false }
|
||||
derive-new = "0.5.9"
|
||||
expect-test = "1.4.0"
|
||||
eyre = "0.6.8"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use criterion::{criterion_group, criterion_main, BatchSize, Criterion};
|
||||
use codspeed_criterion_compat::{criterion_group, criterion_main, BatchSize, Criterion};
|
||||
use salsa::Setter;
|
||||
|
||||
#[salsa::input]
|
||||
|
|
Loading…
Reference in a new issue