29
29
default : ' s'
30
30
type : string
31
31
required : false
32
+ report-format :
33
+ description : ' format of the report'
34
+ default : ' csv'
35
+ type : string
36
+ required : false
32
37
33
38
jobs :
34
39
benchmark :
35
40
runs-on : ${{ inputs.run-on }}
36
41
steps :
37
42
- name : ' Checkout Repository'
38
43
uses : actions/checkout@v4
39
- with :
40
- submodules : true
41
44
- uses : actions/setup-java@v4
42
45
with :
43
46
distribution : temurin
44
47
java-version-file : .ci-java-version
48
+ - uses : actions/setup-python@v5
49
+ with :
50
+ python-version-file : .ci-python-version
45
51
- name : Validate Gradle Wrapper
46
52
uses : gradle/wrapper-validation-action@v2
47
53
- name : Cache konan
57
63
gradle-version : wrapper
58
64
- name : Run benchmarks
59
65
run : >
60
- ./gradlew --no-daemon --info :benchmark:benchmark ${{ inputs.additional-task }}
66
+ ./gradlew --no-daemon :benchmark:benchmark ${{ inputs.additional-task }}
61
67
-Pbenchmark_warmups=${{ inputs.warmups }}
62
68
-Pbenchmark_iterations=${{ inputs.iterations }}
63
69
-Pbenchmark_iteration_time=${{ inputs.iteration-time }}
64
- -Pbenchmark_iteration_time_unit=${{ inputs.iteration-time-unit }}
70
+ -Pbenchmark_iteration_time_unit=${{ inputs.iteration-time-unit }}
71
+ -Pbenchmark_report_format=${{ inputs.report-format }}
72
+ - name : Install CSV to MD converter
73
+ run : pip install csv2md
74
+ - name : Add benchmark results to summary
75
+ shell : bash
76
+ run : |
77
+ for report in $(find ./benchmark/build/reports/benchmarks/main -type f -name "*.csv")
78
+ do
79
+ file_name=$(basename "$report")
80
+ platform="${file_name%.*}"
81
+ echo "# Platform ${platform}" >> $GITHUB_STEP_SUMMARY
82
+ csv2md "$report" >> $GITHUB_STEP_SUMMARY
83
+ done
0 commit comments