| 1 |
name: CodSpeed benchmarks |
| 2 |
|
| 3 |
on: |
| 4 |
push: |
| 5 |
branches: |
| 6 |
- "main" |
| 7 |
pull_request: |
| 8 |
workflow_dispatch: |
| 9 |
|
| 10 |
permissions: |
| 11 |
contents: read |
| 12 |
id-token: write |
| 13 |
|
| 14 |
jobs: |
| 15 |
benchmarks: |
| 16 |
name: Run benchmarks |
| 17 |
runs-on: ubuntu-latest |
| 18 |
steps: |
| 19 |
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 |
| 20 |
with: |
| 21 |
submodules: true |
| 22 |
- name: Obtain Rust |
| 23 |
run: rustup override set nightly |
| 24 |
- name: Install cargo-codspeed |
| 25 |
run: cargo install cargo-codspeed |
| 26 |
- name: Build benchmarks |
| 27 |
run: cargo codspeed build --no-default-features |
| 28 |
- name: Run the benchmarks |
| 29 |
uses: CodSpeedHQ/action@fa0c9b1770f933c1bc025c83a9b42946b102f4e6 # v4.10.4 |
| 30 |
with: |
| 31 |
mode: instrumentation |
| 32 |
run: cargo codspeed run |