1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: Benchmark
# Informational benchmark, never blocks merge. Each PR is benchmarked A/B on
# one VM: the PR ref and base `main` are built and run side by side and the PR
# is compared against that same-host main arm (see supertable-bench-azure.yml).
# Uses `pull_request_target` (not `pull_request`) so the job runs in the
# base-repo context where the Azure secrets live — a fork `pull_request` run
# gets none. Fork code is gated on maintainer approval before secrets are
# exposed (see `is_fork_pr`).
on:
push:
branches:
# Only refresh the baseline when perf-relevant code lands. Doc/example/
# binding-only merges can't move performance, so skip the VM spin-up.
# (GitHub Actions ignores YAML anchors, so the list is repeated below.)
paths:
- "src/**"
- "benches/**"
- "build.rs"
- "Cargo.toml"
- "Cargo.lock"
- "rust-toolchain.toml"
- ".github/workflows/bench.yml"
- ".github/workflows/supertable-bench-azure.yml"
pull_request_target:
branches:
# Code/state changes only — never on label or comment activity.
types:
# Same allowlist: skip the 4-VM bench on doc/example/binding-only PRs.
paths:
- "src/**"
- "benches/**"
- "build.rs"
- "Cargo.toml"
- "Cargo.lock"
- "rust-toolchain.toml"
- ".github/workflows/bench.yml"
- ".github/workflows/supertable-bench-azure.yml"
jobs:
bench:
# Skip on forks (no Azure secrets); fork PRs into upstream still run.
if: github.repository_owner == 'infino-ai'
strategy:
fail-fast: false # one member failing must not cancel the other
matrix:
# One modality per leg, each on its own VM. `suffix` keeps per-leg
# resources and comment markers unique (all legs share one run_id).
include:
-
-
-
-
# A new push to the PR cancels the in-flight run for that bench.
concurrency:
group: bench-${{ github.event.pull_request.number }}-${{ matrix.bench }}
cancel-in-progress: true
permissions:
id-token: write
contents: read
pull-requests: write # post the bench-results comment on the PR
uses: ./.github/workflows/supertable-bench-azure.yml
with:
bench: ${{ matrix.bench }}
docs: ${{ matrix.docs }}
ref: ${{ github.event.pull_request.head.sha }}
name_suffix: -${{ matrix.suffix }}
pr_number: ${{ github.event.pull_request.number }}
# Fork PR ⇒ gate on maintainer approval before secrets are exposed.
# Guard on the event: a push has no pull_request context, so the bare
# inequality would treat every push as a fork and route it to the
# approval-gated environment, leaving baseline runs stuck awaiting review.
is_fork_pr: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name != github.repository }}
secrets: inherit