Skip to content

Commit a99f698

Browse files
Adding benchmark test workflow
1 parent 9d30010 commit a99f698

File tree

1 file changed

+60
-0
lines changed

1 file changed

+60
-0
lines changed

.github/workflows/benchmark.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Benchmark
2+
3+
on:
4+
push:
5+
branches: [main, shefeek/benchmark_on_merge]
6+
workflow_dispatch: # Allow manual trigger
7+
8+
env:
9+
CARGO_TERM_COLOR: always
10+
RUST_BACKTRACE: 1
11+
RUSTC_WRAPPER: "sccache"
12+
13+
jobs:
14+
benchmark:
15+
name: Run TPC-H Benchmark
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Install Rust toolchain
21+
uses: dtolnay/rust-toolchain@stable
22+
23+
- name: Install sccache
24+
uses: mozilla-actions/sccache-action@v0.0.6
25+
26+
- name: Cache Cargo registry
27+
uses: actions/cache@v4
28+
with:
29+
path: ~/.cargo/registry
30+
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
31+
restore-keys: |
32+
${{ runner.os }}-cargo-registry-
33+
34+
- name: Cache Cargo index
35+
uses: actions/cache@v4
36+
with:
37+
path: ~/.cargo/git
38+
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
39+
restore-keys: |
40+
${{ runner.os }}-cargo-index-
41+
42+
- name: Cache TPC-H test data
43+
id: cache-tpch
44+
uses: actions/cache@v4
45+
with:
46+
path: |
47+
benchmark/data/tpch.ducklake
48+
benchmark/data/tpch_files
49+
key: tpch-sf1-v1
50+
51+
- name: Generate TPC-H SF1 data
52+
if: steps.cache-tpch.outputs.cache-hit != 'true'
53+
run: cargo run --release --bin generate-tpch -- --scale-factor 1
54+
55+
- name: Run TPC-H Benchmark
56+
run: |
57+
cargo run --release --bin ducklake-benchmark -- \
58+
--catalog benchmark/data/tpch.ducklake \
59+
--tpch \
60+
--iterations 3

0 commit comments

Comments
 (0)