Skip to content
This repository was archived by the owner on Jan 7, 2025. It is now read-only.

Commit 51adb13

Browse files
committed
add tpch benchmark workflow
1 parent b4b1aea commit 51adb13

File tree

1 file changed

+64
-0
lines changed

1 file changed

+64
-0
lines changed

.github/workflows/tpch.yaml

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Rust TPC-H Benchmarks
2+
3+
# Do not run this workflow on pull request since this workflow has permission to modify contents.
4+
on:
5+
push:
6+
branches:
7+
- master
8+
# Hack for testing (REMOVE)
9+
- continuous-bench-attempt
10+
11+
permissions:
12+
# deployments permission to deploy GitHub pages website
13+
deployments: write
14+
# contents permission to update benchmark contents in gh-pages branch
15+
contents: write
16+
17+
jobs:
18+
benchmark:
19+
# Make sure an error doesn't mean we waste everything that has been compiled.
20+
continue-on-error: true
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
os: [ubuntu-latest]
25+
26+
name: Run Rust benchmark example
27+
runs-on: ${{ matrix.os }}
28+
steps:
29+
# Setup Rust.
30+
- uses: actions/checkout@v4
31+
- run: rustup toolchain install stable --profile minimal --no-self-update
32+
33+
# Make sure to use cached compilation objects if they exist.
34+
- uses: Swatinem/rust-cache@v2
35+
36+
# Run the benchmark and store to `output.txt`.
37+
- name: Run benchmark
38+
# (REMOVE) run everything instead of just q6
39+
run: cargo bench --bench planner_bench tpch/q6 | tee output.txt
40+
41+
# Download the previous benchmark result from the cache (if it exists).
42+
- name: Download previous benchmark data
43+
uses: actions/cache@v4
44+
with:
45+
path: ./cache
46+
key: ${{ runner.os }}-benchmark
47+
48+
# Run the `github-action-benchmark` action.
49+
- name: Store benchmark result
50+
uses: benchmark-action/github-action-benchmark@v1
51+
with:
52+
name: Rust Benchmark
53+
tool: "cargo"
54+
output-file-path: output.txt
55+
gh-pages-branch: gh-pages
56+
external-data-json-path: cache/benchmark-data.json
57+
github-token: ${{ secrets.GITHUB_TOKEN }}
58+
auto-push: true
59+
# Show alert with commit comment on detecting possible performance regression
60+
alert-threshold: "125%"
61+
summary-always: true
62+
comment-on-alert: true
63+
fail-on-alert: true
64+
alert-comment-cc-users: "@connortsui20"

0 commit comments

Comments
 (0)