Skip to content

Update benchmark.yaml #21

Update benchmark.yaml

Update benchmark.yaml #21

Workflow file for this run

name: Benchmark and Publish
on:
push:
branches:
- stwo-backend
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
jobs:
benchmark:
name: Run Benchmarks
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Setup Rust
uses: moonrepo/setup-rust@v0
with:
toolchain: nightly-2024-12-17
- name: Cache Benchmark Data
uses: actions/cache@v3
id: cache-bench
with:
path: ./target/criterion
key: ${{ runner.os }}-bench-${{ github.sha }}
restore-keys: |
${{ runner.os }}-bench-
- name: Run Benchmarks
run: cargo bench --bench tensor_ops
- name: Process Benchmark Results
uses: joshua-auchincloss/criterion-pages@v1
with:
path: "./target/criterion"
- name: Setup GitHub Pages
uses: actions/configure-pages@v3
- name: Upload Benchmark Artifact
uses: actions/upload-pages-artifact@v2
with:
path: "./target/criterion"
deploy:
name: Deploy to GitHub Pages
runs-on: ubuntu-latest
needs: benchmark
steps:
- name: Deploy Benchmark Results
uses: actions/deploy-pages@v2