Skip to content

Commit

Permalink
ci: Continuous benchmarking with codspeed.io
Browse files Browse the repository at this point in the history
  • Loading branch information
aborgna-q committed Feb 21, 2025
1 parent bb0d54b commit e84da3a
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions .github/workflows/ci-rs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,11 @@ jobs:
RUSTDOCFLAGS: "-Dwarnings"

benches:
name: Build benchmarks 🏋️
needs: changes
name: Continuous benchmarking 🏋️
if: ${{ needs.changes.outputs.rust == 'true' && github.event_name != 'merge_group' }}
runs-on: ubuntu-latest
permissions:
checks: write
steps:
- uses: actions/checkout@v4
- uses: mozilla-actions/[email protected]
Expand All @@ -101,10 +102,18 @@ jobs:
uses: KyleMayes/install-llvm-action@v2
with:
version: ${{ env.LLVM_VERSION }}
- name: Build benchmarks with no features
run: cargo bench --verbose --no-run --no-default-features
- name: Build benchmarks with all features
run: cargo bench --verbose --no-run --all-features
- uses: cargo-bins/cargo-binstall@main
- name: Install cargo-codspeed
run: cargo binstall cargo-codspeed --force
- name: Override criterion with the CodSpeed harness
run: cargo add --dev codspeed-criterion-compat --rename criterion
- name: Build benchmarks
run: cargo codspeed build --profile bench
- name: Run benchmarks
uses: CodSpeedHQ/action@v3
with:
token: ${{ secrets.CODSPEED_TOKEN }}
run: "cargo codspeed run"

# Run tests on Rust stable
tests-stable-no-features:
Expand Down

0 comments on commit e84da3a

Please sign in to comment.