Update benchmark.yaml #22
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: 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 (Nightly) | |
uses: dtolnay/rust-toolchain@stable | |
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 +nightly-2024-12-17 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 |