Skip to content

Merge pull request #273 from umccr/fix/deploy-c4gh-settings #133

Merge pull request #273 from umccr/fix/deploy-c4gh-settings

Merge pull request #273 from umccr/fix/deploy-c4gh-settings #133

Workflow file for this run

name: benchmarks
on:
push:
branches:
- main
permissions:
# deployments permission to deploy GitHub pages website
deployments: write
# contents permission to update benchmark contents in gh-pages branch
contents: write
jobs:
benchmark:
runs-on: ${{ matrix.os }}
strategy:
matrix:
rust: [stable]
os: [ubuntu-latest]
steps:
- name: Check out
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@master
id: toolchain
with:
toolchain: ${{ matrix.rust }}
- run: rustup override set ${{ steps.toolchain.outputs.name }}
- name: Cache
uses: Swatinem/rust-cache@v2
with:
shared-key: build-cache
save-if: false
- name: Install cargo-criterion
uses: baptiste0928/cargo-install@v3
with:
crate: cargo-criterion
- name: Run search benchmarks
run: cargo criterion --bench search-benchmarks --message-format=json -- LIGHT 1> search-benchmarks-output.json
- name: Store search benchmark result
uses: brainstorm/github-action-benchmark@cargo-criterion-v3
with:
name: Search benchmark
tool: "cargo-criterion"
output-file-path: search-benchmarks-output.json
native-benchmark-data-dir-path: target/criterion
fail-on-alert: false
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: true