Skip to content

Commit

Permalink
Create benchmarks.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
drink7036290 authored Dec 2, 2024
1 parent b2c114b commit e90ce93
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Rust

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

env:
CARGO_TERM_COLOR: always
# Change to specific Rust release to pin
rust_stable: stable

jobs:
bench:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust ${{ env.rust_stable }}
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.rust_stable }}

- name: Install Dependencies
run: sudo apt-get install -y gnuplot

- name: Build and Run Benchmarks
run: cargo bench

- name: Upload Benchmark Results
uses: actions/upload-artifact@v3
with:
name: benchmark-results
path: target/criterion/

- name: Deploy Benchmark Report to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./target/criterion/report/

0 comments on commit e90ce93

Please sign in to comment.