File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7474 fi
7575 python3 scripts/codspeed-environment.py "${args[@]}" --github-output
7676
77- # A run on another machine cannot be compared with main's baseline, so it
78- # is not uploaded. Fail rather than skip, so a run that measured nothing
79- # is not shown as green; re-running the job draws a new runner.
80- - name : Require the machine main was measured on
81- if : ${{ steps.environment.outputs.match == 'false' }}
82- run : |
83- echo "::error title=CodSpeed runner mismatch::This runner is not the machine main's baseline was measured on (or no baseline recording could be read), so the benchmarks were not run. Re-run this job to draw another runner."
84- exit 1
85-
8677 - name : Restore cache
78+ if : ${{ steps.environment.outputs.match != 'false' }}
8779 uses : actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
8880 with :
8981 path : ${{ env.CACHE_PATHS }}
9284 continue-on-error : true
9385
9486 - name : Install cargo-codspeed
87+ if : ${{ steps.environment.outputs.match != 'false' }}
9588 run : cargo install cargo-codspeed --locked --version ^5
9689
9790 - name : Build the benchmark targets
91+ if : ${{ steps.environment.outputs.match != 'false' }}
9892 run : cargo codspeed build --locked --measurement-mode simulation -p rustpython -p rustpython-sre_engine
9993
10094 - name : Save cache
@@ -106,6 +100,7 @@ jobs:
106100 continue-on-error : true
107101
108102 - name : Run the benchmarks
103+ if : ${{ steps.environment.outputs.match != 'false' }}
109104 uses : CodSpeedHQ/action@373d6868929f444bc08d901fd0eb0ad52a8875ea # v5.2.1
110105 with :
111106 mode : simulation
Original file line number Diff line number Diff line change 2323
2424The rule this enforces: `main` defines the environment. Every run on it records
2525what it measured on, and a run on any other ref measures only when it matches
26- that recording. Anything else is not uploaded, and the workflow fails the job,
27- because an uploaded cross-environment run is published as a regression of the
28- branch that happened to draw the other machine. A recording that cannot be
29- read is "anything else" too: an unknown machine is not a matching one, and
30- reading it as one would leave the guard open exactly while it has nothing to
31- check against.
26+ that recording. Anything else is skipped rather than uploaded, because an
27+ uploaded cross-environment run is published as a regression of the branch that
28+ happened to draw the other machine. A recording that cannot be read is
29+ "anything else" too: an unknown machine is not a matching one, and reading it as
30+ one would leave the guard open exactly while it has nothing to check against.
3231
3332 codspeed-environment.py --record build/codspeed-environment.json
3433 codspeed-environment.py --record CURRENT --reference REFERENCE --github-output
You can’t perform that action at this time.
0 commit comments