Create benchmarks.yml #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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@v4 | |
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/ |