Make bon builders optional #571
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: benchmarks | |
on: | |
pull_request: | |
types: | |
- opened | |
- reopened | |
issue_comment: | |
types: | |
- created | |
jobs: | |
run_benchmarks: | |
runs-on: ubuntu-latest | |
permissions: | |
pull-requests: write | |
# run either when pull request is opened or when comment body (only on pr) is /run-bench | |
if: (github.event_name == 'pull_request') || ((github.event.issue.pull_request != null) && github.event.comment.body == '/run-bench') | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Setup Rust toolchain | |
uses: dtolnay/rust-toolchain@stable | |
- name: Install hyperfine | |
run: cargo install hyperfine | |
- name: Install cmake | |
run: sudo apt-get update && sudo apt-get install cmake -y | |
- name: Build Binaries | |
run: make binaries | |
- name: Run Benchmarks | |
run: make bench-all | |
- name: Post result comment | |
uses: mshick/add-pr-comment@v2 | |
with: | |
message-path: bench-output.md |