Repository navigation
Expand file tree
/
Copy pathaction.yml
More file actions
208 lines (204 loc) · 7.4 KB
/
Copy pathaction.yml
File metadata and controls
208 lines (204 loc) · 7.4 KB
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
name: ASV Perch
description: >-
Post formatted ASV benchmark comparison results as PR comments with
regression detection, emoji indicators, and collapsible sections.
author: Rohit Goswami
inputs:
github-token:
description: >-
GitHub token for API access (posting PR comments, auto-draft).
Not required when post-comment is false and auto-draft-on-regression
is false (token-less artifact-only mode).
required: false
default: ${{ github.token }}
results-path:
description: Path to downloaded ASV results directory
required: false
comparison-text-file:
description: >-
Path to pre-computed comparison output file. When provided, skips
running asv-spyglass entirely and uses this file as the raw output.
required: false
comparison-mode:
description: >-
Comparison mode: 'compare' for two-way (default) or 'compare-many'
for multi-way baseline vs multiple contenders.
required: false
default: compare
baseline-sha:
description: >-
For compare-many mode: the baseline commit SHA. Used to find the
baseline result file by SHA prefix.
required: false
contender-shas:
description: >-
For compare-many mode: comma-separated contender commit SHAs.
Used to find contender result files by SHA prefix.
required: false
baseline-file:
description: >-
For compare-many mode: direct path to baseline result JSON file.
Bypasses SHA-based lookup. Use this when comparing different
environments that ran the same commit.
required: false
contender-files:
description: >-
For compare-many mode: comma-separated direct paths to contender
result JSON files. Bypasses SHA-based lookup. Order must match
contender-labels if both are provided.
required: false
baseline:
description: >-
YAML config for the baseline entry. Fields: label, sha, file,
run-prefix (wrapper command, e.g. "pixi run -e bench"),
setup (sourced before command, e.g. "source ./env.sh"),
env, description. Execution: setup && run-prefix benchmark-command.
required: false
contenders:
description: >-
YAML list of contender objects for compare-many mode. Each object
has: label (required), sha or file (one required for comparison),
run-prefix (wrapper command), setup (sourced before command),
env, description. When provided, overrides contender-files/
contender-shas/contender-labels.
required: false
benchmark-command:
description: >-
Default shell command to run benchmarks. Use {sha} as placeholder
for the commit SHA (replaced in setup, run-prefix, and command).
Each entry's run-prefix is prepended and setup is sourced before.
Entries without a sha field skip benchmarking.
required: false
default: 'asv run --record-samples {sha}^!'
init-command:
description: >-
Shell command to run once before any benchmarks. Use for one-time
setup like 'asv machine --yes'.
required: false
preserve-paths:
description: >-
Comma-separated paths to preserve across git checkouts. When an
entry has a sha, the action runs git checkout -f {sha} && git clean -fd
automatically. These paths are stashed to /tmp before checkout and
restored after. Example: 'benchmarks/, asv.conf.json'.
required: false
baseline-label:
description: >-
For compare-many mode: label for the baseline column.
required: false
contender-labels:
description: >-
For compare-many mode: comma-separated labels for each contender,
matching the order of contender-shas (e.g. "opt-build,debug-build").
required: false
asv-spyglass-args:
description: >-
Extra CLI flags passed through to asv-spyglass (e.g. --split,
--only-changed, --only-regressed, --factor 1.2, --sort ratio).
required: false
base-sha:
description: Base commit SHA (overrides metadata-file)
required: false
pr-sha:
description: PR head commit SHA (overrides metadata-file)
required: false
base-file:
description: >-
Direct path to base result JSON file. Bypasses SHA-based file
lookup. Useful when files are not named by SHA prefix.
required: false
pr-file:
description: >-
Direct path to PR result JSON file. Bypasses SHA-based file
lookup. Useful when files are not named by SHA prefix.
required: false
metadata-file:
description: >-
Path to metadata.txt with main_sha=/base_sha= and pr_sha= lines.
Alternative to explicit SHA inputs.
required: false
regression-threshold:
description: Ratio above which a benchmark is a critical regression
required: false
default: '10'
auto-draft-on-regression:
description: Convert PR to draft when critical regression detected
required: false
default: 'false'
comment-marker:
description: HTML comment marker for idempotent updates
required: false
default: '<!-- asv-benchmark-result -->'
label-before:
description: Label for the base/before column
required: false
default: main
label-after:
description: Label for the head/after column
required: false
default: pr
asv-spyglass-ref:
description: Git ref for asv-spyglass install
required: false
default: main
runner-info:
description: Runner name shown in details section
required: false
default: ubuntu-latest
dashboard-url:
description: Link to ASV dashboard (optional)
required: false
env-diff:
description: >-
When true, parse baseline/contender ASV result JSON and append an
"## Environment inventory" section (added/removed/version-bumped
packages). Pure TypeScript -- does not require asv-spyglass for this
feature. Cheap JSON parse; default true. Set false to skip.
required: false
default: 'true'
post-comment:
description: >-
When true (default), create or update a PR comment with the comparison.
Set false for token-less workflows that only need the markdown body
(pair with upload-comment-artifact).
required: false
default: 'true'
upload-comment-artifact:
description: >-
When true, write the comment markdown to comment-artifact-path and set
comment-body-path / comment-artifact-name outputs. Pair with a follow-up
actions/upload-artifact step so fork/PR jobs can skip pull-requests: write
and hand the body to a trusted commenter.
required: false
default: 'false'
comment-artifact-name:
description: Artifact name when upload-comment-artifact is true
required: false
default: asv-perch-comment
comment-artifact-path:
description: >-
Filesystem path for the prepared comment markdown when
upload-comment-artifact is true (also exposed as comment-body-path output).
required: false
default: asv-perch-comment.md
outputs:
comparison:
description: Raw asv-spyglass comparison output
regression-detected:
description: Whether a critical regression was detected
comment-id:
description: ID of the created or updated comment
pr-number:
description: Number of the associated pull request
comment-body-path:
description: >-
Path to the written comment markdown when upload-comment-artifact is true
comment-artifact-name:
description: >-
Name of the uploaded artifact when upload-comment-artifact is true
branding:
icon: bar-chart-2
color: orange
runs:
using: node20
main: dist/index.js