@@ -20,13 +20,15 @@ defaults:
2020
2121jobs :
2222 benchmark :
23- name : Benchmark (${{ matrix.platform }})
23+ name : Benchmark (${{ matrix.platform }}-${{ matrix.repeat }} )
2424 permissions :
2525 actions : read
2626 contents : read
2727 strategy :
2828 fail-fast : false
2929 matrix :
30+ platform : [linux, macos, windows]
31+ repeat : [1, 2, 3, 4, 5, 6]
3032 include :
3133 - platform : linux
3234 os : namespace-profile-linux-x64-default
8385 baseline=(--save-baseline main)
8486 fi
8587 set -o pipefail
86- result_file=".benchmark-results/${{ matrix.platform }}.txt"
88+ result_file=".benchmark-results/${{ matrix.platform }}-${{ matrix.repeat }} .txt"
8789 cargo bench --locked -p fspy_benchmark --bench fspy -- \
8890 --color never --verbose -n "${baseline[@]}" |
8991 tee "$result_file"
9496 run : |
9597 {
9698 echo '```text'
97- cat ".benchmark-results/${{ matrix.platform }}.txt"
99+ cat ".benchmark-results/${{ matrix.platform }}-${{ matrix.repeat }} .txt"
98100 echo
99101 echo '```'
100102 } >> "$GITHUB_STEP_SUMMARY"
@@ -115,8 +117,8 @@ jobs:
115117 # comment job to combine into one sticky comment after all platforms finish.
116118 uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
117119 with :
118- name : fspy-benchmark-report-${{ matrix.platform }}
119- path : .benchmark-results/${{ matrix.platform }}.txt
120+ name : fspy-benchmark-report-${{ matrix.platform }}-${{ matrix.repeat }}
121+ path : .benchmark-results/${{ matrix.platform }}-${{ matrix.repeat }} .txt
120122 if-no-files-found : error
121123 overwrite : true
122124 retention-days : 90
@@ -144,11 +146,11 @@ jobs:
144146 {
145147 echo '## fspy benchmark'
146148 echo
147- for platform in linux macos windows ; do
148- echo "### $platform "
149+ for result in .benchmark-results/*.txt ; do
150+ echo "### $(basename "$result" .txt) "
149151 echo
150152 echo '```text'
151- cat ".benchmark-results/$platform.txt "
153+ cat "$result "
152154 echo
153155 echo '```'
154156 echo
0 commit comments