|
| 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 | + name: Run Rust benchmark example |
| 20 | + runs-on: ubuntu-latest |
| 21 | + steps: |
| 22 | + # Setup Rust. |
| 23 | + - uses: actions/checkout@v4 |
| 24 | + - run: rustup toolchain install stable --profile minimal --no-self-update |
| 25 | + # Make sure to use cached compilation objects if they exist. |
| 26 | + - uses: Swatinem/rust-cache@v2 |
| 27 | + # Run the benchmark and store to `results/tpch.txt`. |
| 28 | + - name: Run benchmark |
| 29 | + # (REMOVE) run everything instead of just q6 |
| 30 | + run: cargo bench --bench planner_bench tpch/q6/ | tee results/tpch.txt |
| 31 | + # Download the previous benchmark result from the cache (if it exists). |
| 32 | + - name: Download previous benchmark data |
| 33 | + uses: actions/cache@v4 |
| 34 | + with: |
| 35 | + path: ./cache |
| 36 | + key: ${{ runner.os }}-benchmark |
| 37 | + # Run the `github-action-benchmark` action. |
| 38 | + - name: Store benchmark result |
| 39 | + uses: benchmark-action/github-action-benchmark@v1 |
| 40 | + with: |
| 41 | + name: Rust Benchmark |
| 42 | + tool: 'cargo' |
| 43 | + output-file-path: results/tpch.txt |
| 44 | + gh-pages-branch: gh-pages |
| 45 | + external-data-json-path: cache/benchmark-data.json |
| 46 | + github-token: ${{ secrets.GITHUB_TOKEN }} |
| 47 | + auto-push: true |
| 48 | + # Show alert with commit comment on detecting possible performance regression |
| 49 | + alert-threshold: '125%' |
| 50 | + summary-always: true |
| 51 | + comment-on-alert: true |
| 52 | + fail-on-alert: true |
| 53 | + alert-comment-cc-users: '@connortsui20' |
| 54 | + |
| 55 | + # - name: Store benchmark result - separate results repo |
| 56 | + # uses: benchmark-action/github-action-benchmark@v1 |
| 57 | + # with: |
| 58 | + # name: Rust Benchmark |
| 59 | + # tool: 'cargo' |
| 60 | + # output-file-path: results/tpch.txt |
| 61 | + # github-token: ${{ secrets.BENCHMARK_ACTION_BOT_TOKEN }} |
| 62 | + # auto-push: true |
| 63 | + # # Show alert with commit comment on detecting possible performance regression |
| 64 | + # alert-threshold: '200%' |
| 65 | + # summary-always: true |
| 66 | + # comment-on-alert: true |
| 67 | + # fail-on-alert: true |
| 68 | + # alert-comment-cc-users: '@connortsui20' |
| 69 | + # gh-repository: 'github.com/???' |
0 commit comments