|
28 | 28 | # Topology: |
29 | 29 | # |
30 | 30 | # setup ─┐ |
31 | | -# ├──→ bench (matrix, ~88 jobs) |
| 31 | +# ├──→ bench (matrix, ~78 jobs) |
32 | 32 | # build ─┘ |
33 | 33 | # |
34 | | -# `setup` parses every workspace Cargo.toml's `[[bench]]` entries and |
35 | | -# emits a {crate, bench} matrix. `build` does the full-workspace |
| 34 | +# `setup` discovers every `[[bench]]` target via `cargo metadata` (see |
| 35 | +# codspeed-matrix.sh) and emits a {crate, bench} matrix. `build` does the |
| 36 | +# full-workspace |
36 | 37 | # `cargo codspeed build` exactly once and uploads |
37 | 38 | # `target/codspeed/<mode>/` as an artifact. `bench` shards download the |
38 | 39 | # artifact and run a single bench target each via the CodSpeed action; |
@@ -74,46 +75,15 @@ jobs: |
74 | 75 | steps: |
75 | 76 | - uses: actions/checkout@v6 |
76 | 77 |
|
77 | | - - name: Generate matrix of {crate, bench} from workspace Cargo.tomls |
| 78 | + - name: Generate {crate, bench} matrix across the workspace |
78 | 79 | id: gen |
79 | | - env: |
80 | | - # Bench targets known to panic / error at runtime as of writing. |
81 | | - # These are pre-existing issues in the bench targets themselves, |
82 | | - # not the CodSpeed integration; they should be fixed and removed |
83 | | - # from this list one by one. |
84 | | - # - arrow / merge_kernels: panics at arrow-data/src/transform/primitive.rs:31 |
85 | | - # - arrow / buffer_bit_ops, buffer_create, sort_kernel, |
86 | | - # string_run_builder, primitive_run_accessor: fail at runtime |
87 | | - # - arrow-array / union_array, arrow-cast / parse_date: fail at runtime |
88 | | - # - parquet / row_selection_cursor: fails at runtime |
89 | | - # - parquet-variant-compute / variant_kernels: intermittent |
90 | | - EXCLUDED_BENCHES: | |
91 | | - arrow merge_kernels |
92 | | - arrow buffer_bit_ops |
93 | | - arrow buffer_create |
94 | | - arrow sort_kernel |
95 | | - arrow string_run_builder |
96 | | - arrow primitive_run_accessor |
97 | | - arrow-array union_array |
98 | | - arrow-cast parse_date |
99 | | - parquet row_selection_cursor |
100 | | - parquet-variant-compute variant_kernels |
| 80 | + # Discovery + the known-broken exclusion list live in the shared |
| 81 | + # codspeed-matrix.sh (also used by codspeed-pr.yml) so they stay in |
| 82 | + # one place. No args = every workspace crate. |
101 | 83 | run: | |
102 | | - { |
103 | | - for crate in arrow arrow-array arrow-avro arrow-buffer arrow-cast arrow-ipc arrow-json arrow-schema parquet parquet-variant parquet-variant-compute; do |
104 | | - awk -v crate="$crate" ' |
105 | | - /^\[\[bench\]\]/ { in_bench=1; next } |
106 | | - /^\[/ { in_bench=0 } |
107 | | - in_bench && /^name = / { |
108 | | - sub(/^name = "/, ""); sub(/"$/, ""); |
109 | | - printf "%s %s\n", crate, $0 |
110 | | - } |
111 | | - ' "$crate/Cargo.toml" |
112 | | - done |
113 | | - } | grep -vxF -f <(printf '%s\n' "$EXCLUDED_BENCHES" | sed '/^$/d') \ |
114 | | - | jq -Rcs 'split("\n") | map(select(length>0) | split(" ") | {crate: .[0], bench: .[1]})' > matrix.json |
115 | | - echo "matrix=$(cat matrix.json)" >> "$GITHUB_OUTPUT" |
116 | | - echo "::notice::Generated $(jq length matrix.json) bench shards (after excluding known-broken targets)" |
| 84 | + matrix="$(bash .github/workflows/codspeed-matrix.sh)" |
| 85 | + echo "matrix=$matrix" >> "$GITHUB_OUTPUT" |
| 86 | + echo "::notice::Generated $(jq length <<<"$matrix") bench shards (one per bench target, known-broken targets excluded)" |
117 | 87 |
|
118 | 88 | build: |
119 | 89 | name: Build workspace benchmarks |
|
0 commit comments