add tpch benchmark workflow #2
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: Rust TPC-H Benchmarks | |
# Do not run this workflow on pull request since this workflow has permission to modify contents. | |
on: | |
push: | |
branches: | |
- master | |
# Hack for testing | |
- continuous-bench-attempt | |
permissions: | |
# deployments permission to deploy GitHub pages website | |
deployments: write | |
# contents permission to update benchmark contents in gh-pages branch | |
contents: write | |
jobs: | |
benchmark: | |
name: Run Rust benchmark example | |
runs-on: ubuntu-latest | |
steps: | |
# Setup Rust. | |
- uses: actions/checkout@v4 | |
- run: rustup toolchain update nightly && rustup default nightly | |
# Run the benchmark and store to `results/tpch.txt`. | |
- name: Run benchmark | |
run: cargo +nightly bench --bench planner_bench tpch/q6/ | tee results/tpch.txt | |
# Download the previous benchmark result from the cache (if it exists). | |
- name: Download previous benchmark data | |
uses: actions/cache@v4 | |
with: | |
path: ./cache | |
key: ${{ runner.os }}-benchmark | |
# Run the `github-action-benchmark` action. | |
- name: Store benchmark result | |
uses: benchmark-action/github-action-benchmark@v1 | |
with: | |
name: Rust Benchmark | |
tool: 'cargo' | |
output-file-path: results/tpch.txt | |
gh-pages-branch: gh-pages | |
external-data-json-path: cache/benchmark-data.json | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
auto-push: true | |
# Show alert with commit comment on detecting possible performance regression | |
alert-threshold: '125%' | |
summary-always: true | |
comment-on-alert: true | |
fail-on-alert: true | |
alert-comment-cc-users: '@connortsui20' | |
# - name: Store benchmark result - separate results repo | |
# uses: benchmark-action/github-action-benchmark@v1 | |
# with: | |
# name: Rust Benchmark | |
# tool: 'cargo' | |
# output-file-path: results/tpch.txt | |
# github-token: ${{ secrets.BENCHMARK_ACTION_BOT_TOKEN }} | |
# auto-push: true | |
# # Show alert with commit comment on detecting possible performance regression | |
# alert-threshold: '200%' | |
# summary-always: true | |
# comment-on-alert: true | |
# fail-on-alert: true | |
# alert-comment-cc-users: '@connortsui20' | |
# gh-repository: 'github.com/???' |