File tree 2 files changed +54
-23
lines changed
2 files changed +54
-23
lines changed Original file line number Diff line number Diff line change @@ -170,29 +170,7 @@ jobs:
170
170
- name : Run icount benchmarks
171
171
env :
172
172
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
173
- run : |
174
- set -eux
175
- iai_home="iai-home"
176
- # Download the baseline from master
177
- ./ci/ci-util.py locate-baseline --download --extract
178
-
179
- # Run iai-callgrind benchmarks
180
- cargo bench --no-default-features \
181
- --features unstable,unstable-float,icount \
182
- --bench icount \
183
- -- \
184
- --save-baseline=default \
185
- --home "$(pwd)/$iai_home" \
186
- --regression='ir=5.0' \
187
- --save-summary
188
- # NB: iai-callgrind should exit on error but does not, so we inspect the sumary
189
- # for errors. See https://github.com/iai-callgrind/iai-callgrind/issues/337
190
- ./ci/ci-util.py check-regressions "$iai_home"
191
-
192
- # Name and tar the new baseline
193
- name="baseline-icount-$(date -u +'%Y%m%d%H%M')-${GITHUB_SHA:0:12}"
194
- echo "BASELINE_NAME=$name" >> "$GITHUB_ENV"
195
- tar cJf "$name.tar.xz" "$iai_home"
173
+ run : ./ci/bench-icount.sh
196
174
197
175
- name : Upload the benchmark baseline
198
176
uses : actions/upload-artifact@v4
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ set -eux
4
+
5
+ iai_home=" iai-home"
6
+
7
+ # Download the baseline from master
8
+ ./ci/ci-util.py locate-baseline --download --extract
9
+
10
+ # Run benchmarks once
11
+ function run_icount_benchmarks() {
12
+ cargo_args=(
13
+ " --bench" " icount"
14
+ " --no-default-features"
15
+ " --features" " unstable,unstable-float,icount"
16
+ )
17
+
18
+ iai_args=(
19
+ " --home" " $( pwd) /$iai_home "
20
+ " --regression=ir=5.0"
21
+ " --save-summary"
22
+ )
23
+
24
+ # Parse `cargo_arg0 cargo_arg1 -- iai_arg0 iai_arg1` syntax
25
+ parsing_iai_args=0
26
+ while [ " $# " -gt 0 ]; do
27
+ if [ " $parsing_iai_args " == " 1" ]; then
28
+ iai_args+=(" $1 " )
29
+ elif [ " $1 " == " --" ]; then
30
+ parsing_iai_args=1
31
+ else
32
+ cargo_args+=(" $1 " )
33
+ fi
34
+
35
+ shift
36
+ done
37
+
38
+ # Run iai-callgrind benchmarks
39
+ cargo bench " ${cargo_args[@]} " -- " ${iai_args[@]} "
40
+
41
+ # NB: iai-callgrind should exit on error but does not, so we inspect the sumary
42
+ # for errors. See https://github.com/iai-callgrind/iai-callgrind/issues/337
43
+ ./ci/ci-util.py check-regressions --home " $iai_home " || true
44
+ }
45
+
46
+ # Run once with softfloats, once with arch instructions enabled
47
+ run_icount_benchmarks --features force-soft-floats -- --save-baseline=softfloat
48
+ run_icount_benchmarks -- --save-baseline=hardfloat
49
+
50
+ # Name and tar the new baseline
51
+ name=" baseline-icount-$( date -u +' %Y%m%d%H%M' ) -${GITHUB_SHA: 0: 12} "
52
+ echo " BASELINE_NAME=$name " >> " $GITHUB_ENV "
53
+ tar cJf " $name .tar.xz" " $iai_home "
You can’t perform that action at this time.
0 commit comments