|
| 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