File tree 4 files changed +26
-11
lines changed
4 files changed +26
-11
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ git push origin main
44
44
45
45
The ` bench_runner.toml ` file created at the root of your repository contains configuration specific to your instance.
46
46
More details about this configuration are below.
47
- Every time you make a change to the ` bench_runner.toml ` file, you will need to rerun ` python -m bench_runer install ` to have the changes reflected.
47
+ Every time you make a change to the ` bench_runner.toml ` file, you will need to rerun ` python -m bench_runner install ` to have the changes reflected.
48
48
49
49
### Add some self-hosted runners
50
50
@@ -87,6 +87,12 @@ hostname = "cpython-benchmarking-azure"
87
87
available = false
88
88
```
89
89
90
+ If you don't want a machine to be included when the user selects "machine == 'all'", add:
91
+
92
+ ```
93
+ include_in_all = false
94
+ ```
95
+
90
96
### Try a benchmarking run
91
97
92
98
There are instructions for running a benchmarking action already in the ` README.md ` of your repo. Look there and give it a try!
@@ -144,7 +150,7 @@ python -m bench_runner purge
144
150
145
151
To see more options that control what is deleted, run ` python -m bench_runner purge --help ` .
146
152
147
- After purging the results, you will usually want to squash the git history down to a single commit to save space in your repository. ** NOTE THAT THIS IS A DESTRUCTIVE OPERATION THAT WILL DELETE OLD DATA.**
153
+ After purging the results, you will usually want to squash the git history down to a single commit to save space in your repository. ** NOTE THAT THIS IS A DESTRUCTIVE OPERATION THAT WILL DELETE OLD DATA.**
148
154
149
155
```
150
156
git checkout --orphan new-main main
@@ -155,7 +161,7 @@ git branch -M new-main main
155
161
git push -f origin main
156
162
```
157
163
158
- ### Running
164
+ ### Running
159
165
160
166
## Developer
161
167
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ def __init__(
20
20
# Override the Github self-hosted runner name if different from
21
21
# os-arch-nickname
22
22
github_runner_name : str | None ,
23
+ include_in_all : bool = True ,
23
24
):
24
25
self .nickname = nickname
25
26
self .os = os
@@ -30,6 +31,7 @@ def __init__(
30
31
if github_runner_name is None :
31
32
github_runner_name = self .name
32
33
self .github_runner_name = github_runner_name
34
+ self .include_in_all = include_in_all
33
35
34
36
@property
35
37
def name (self ) -> str :
@@ -54,6 +56,7 @@ def get_runners() -> list[Runner]:
54
56
section .get ("available" , True ),
55
57
section .get ("env" , {}),
56
58
section .get ("github_runner_name" ),
59
+ section .get ("include_in_all" , True ),
57
60
)
58
61
)
59
62
Original file line number Diff line number Diff line change @@ -147,9 +147,15 @@ def generate__benchmark(src: Any) -> Any:
147
147
runner_template ["steps" ].insert (0 , setup_environment )
148
148
149
149
runner_template ["runs-on" ].append (runner .github_runner_name )
150
- runner_template ["if" ] = (
151
- f"${{{{ (inputs.machine == '{ runner .name } ' || inputs.machine == 'all') }}}}"
152
- )
150
+
151
+ machine_clauses = [
152
+ f"inputs.machine == '{ runner .name } '" ,
153
+ "inputs.machine == '__really_all'" ,
154
+ ]
155
+ if runner .include_in_all :
156
+ machine_clauses .append ("inputs.machine == 'all'" )
157
+ runner_template ["if" ] = f"${{{{ ({ ' || ' .join (machine_clauses )} ) }}}}"
158
+
153
159
dst ["jobs" ][f"benchmark-{ runner .name } " ] = runner_template
154
160
155
161
add_flag_env (dst ["jobs" ])
@@ -174,7 +180,7 @@ def generate_benchmark(dst: Any) -> Any:
174
180
user.
175
181
"""
176
182
available_runners = [r for r in runners .get_runners () if r .available ]
177
- runner_choices = [* [x .name for x in available_runners ], "all" ]
183
+ runner_choices = [* [x .name for x in available_runners ], "all" , "__really_all" ]
178
184
179
185
dst ["on" ]["workflow_dispatch" ]["inputs" ]["machine" ]["options" ] = runner_choices
180
186
Original file line number Diff line number Diff line change 34
34
with :
35
35
fork : python
36
36
ref : ${{ needs.determine_head.outputs.commit }}
37
- machine : all
37
+ machine : __really_all
38
38
benchmarks : all_and_excluded
39
39
pgo : true
40
40
tier2 : false
46
46
with :
47
47
fork : python
48
48
ref : ${{ needs.determine_head.outputs.commit }}
49
- machine : all
49
+ machine : __really_all
50
50
benchmarks : all_and_excluded
51
51
pgo : true
52
52
tier2 : false
59
59
with :
60
60
fork : python
61
61
ref : ${{ needs.determine_head.outputs.commit }}
62
- machine : all
62
+ machine : __really_all
63
63
benchmarks : all_and_excluded
64
64
pgo : true
65
65
tier2 : false
73
73
with :
74
74
fork : python
75
75
ref : ${{ needs.determine_head.outputs.commit }}
76
- machine : all
76
+ machine : __really_all
77
77
benchmarks : all_and_excluded
78
78
pgo : true
79
79
tier2 : false
You can’t perform that action at this time.
0 commit comments