Skip to content

allow manually trigger & add permission to write (#118) #149

allow manually trigger & add permission to write (#118)

allow manually trigger & add permission to write (#118) #149

Workflow file for this run

name: Rust Benchmark
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
contents: write
deployments: write
jobs:
benchmark:
name: Run Rust benchmark
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
default: true
toolchain: nightly
target: wasm32-wasi
- name: Install WasmEdge
run: |
curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | bash -s -- -v 0.12.1
- name: Install witc
run: |
stack install
- name: Run benchmark
run: |
source $HOME/.wasmedge/env
cd bench && cargo build --release
cargo bench -p runtime | tee output.txt
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
with:
name: Rust Benchmark
tool: 'cargo'
output-file-path: bench/output.txt
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: true
# Show alert with commit comment on detecting possible performance regression
alert-threshold: '200%'
comment-on-alert: true
fail-on-alert: false
alert-comment-cc-users: '@dannypsnl,@dm4'