8
8
- master
9
9
10
10
jobs :
11
- rust :
12
- name : Run Rust benchmark example - github.com/benchmark-action/github-action-benchmark-results
11
+ benchmarkdotnet-framework :
12
+ name : Run Benchmark.Net .Net Benchmark Framework example - github.com/benchmark-action/github-action-benchmark-results
13
13
runs-on : ubuntu-latest
14
14
steps :
15
15
- uses : actions/checkout@v4
16
+ - uses : actions/setup-dotnet@v3
17
+ with :
18
+ dotnet-version : ' 6.0.101' # SDK Version to use. keep in line with examples/benchmarkdotnet/global.json
16
19
- uses : actions/setup-node@v4
17
20
with :
18
21
node-version : 20
19
22
cache : ' npm'
20
23
- run : npm ci
21
24
- run : npm run build
22
- - run : rustup toolchain update nightly && rustup default nightly
23
25
- name : Run benchmark
24
- run : cd examples/rust && cargo +nightly bench | tee output.txt
26
+ run : cd examples/benchmarkdotnet && dotnet run --exporters json --filter '*'
25
27
26
28
- uses : actions/checkout@v4
27
29
with :
@@ -35,30 +37,27 @@ jobs:
35
37
- name : Store benchmark result
36
38
uses : ./
37
39
with :
38
- name : Rust Benchmark
39
- tool : ' cargo '
40
- output-file-path : examples/rust/output.txt
40
+ name : Benchmark.Net Benchmark
41
+ tool : ' benchmarkdotnet '
42
+ output-file-path : examples/benchmarkdotnet/BenchmarkDotNet.Artifacts/results/Sample.Benchmarks-report-full-compressed.json
41
43
fail-on-alert : true
42
44
gh-repository : ' github.com/benchmark-action/github-action-benchmark-results'
43
45
github-token : ${{ secrets.GITHUB_TOKEN }}
44
- - run : node ./dist/scripts/ci_validate_modification.js before_data.js 'Rust Benchmark' './benchmark-data-repository'
46
+ - run : node ./dist/scripts/ci_validate_modification.js before_data.js 'Benchmark.Net Benchmark' './benchmark-data-repository'
45
47
46
- go :
47
- name : Run Go benchmark example - github.com/benchmark-action/github-action-benchmark-results
48
+ benchmarkjs :
49
+ name : Run JavaScript benchmark example - github.com/benchmark-action/github-action-benchmark-results
48
50
runs-on : ubuntu-latest
49
51
steps :
50
52
- uses : actions/checkout@v4
51
53
- uses : actions/setup-node@v4
52
54
with :
53
55
node-version : 20
54
56
cache : ' npm'
55
- - uses : actions/setup-go@v4
56
- with :
57
- go-version : " stable"
58
57
- run : npm ci
59
58
- run : npm run build
60
59
- name : Run benchmark
61
- run : cd examples/go && go test -bench 'BenchmarkFib' | tee output.txt
60
+ run : cd examples/benchmarkjs && npm install && node bench.js | tee output.txt
62
61
63
62
- uses : actions/checkout@v4
64
63
with :
@@ -72,17 +71,17 @@ jobs:
72
71
- name : Store benchmark result
73
72
uses : ./
74
73
with :
75
- name : Go Benchmark
76
- tool : ' go '
77
- output-file-path : examples/go /output.txt
74
+ name : Benchmark.js Benchmark
75
+ tool : ' benchmarkjs '
76
+ output-file-path : examples/benchmarkjs /output.txt
78
77
fail-on-alert : true
79
78
gh-repository : ' github.com/benchmark-action/github-action-benchmark-results'
80
79
github-token : ${{ secrets.GITHUB_TOKEN }}
81
- - run : node ./dist/scripts/ci_validate_modification.js before_data.js 'Go Benchmark' './benchmark-data-repository'
80
+ - run : node ./dist/scripts/ci_validate_modification.js before_data.js 'Benchmark.js Benchmark' './benchmark-data-repository'
82
81
83
- benchmarkjs :
84
- name : Run JavaScript benchmark example - github.com/benchmark-action/github-action-benchmark-results
85
- runs-on : ubuntu-latest
82
+ catch2-framework :
83
+ name : Run Catch2 C++ Benchmark Framework example - github.com/benchmark-action/github-action-benchmark-results
84
+ runs-on : ubuntu-20.04
86
85
steps :
87
86
- uses : actions/checkout@v4
88
87
- uses : actions/setup-node@v4
92
91
- run : npm ci
93
92
- run : npm run build
94
93
- name : Run benchmark
95
- run : cd examples/benchmarkjs && npm install && node bench.js | tee output.txt
94
+ run : |
95
+ cd examples/catch2
96
+ mkdir build && cd build
97
+ cmake -DCMAKE_BUILD_TYPE=Release ..
98
+ cmake --build . --config Release
99
+ ./Catch2_bench > ../benchmark_result.txt
96
100
97
101
- uses : actions/checkout@v4
98
102
with :
@@ -106,33 +110,34 @@ jobs:
106
110
- name : Store benchmark result
107
111
uses : ./
108
112
with :
109
- name : Benchmark.js Benchmark
110
- tool : ' benchmarkjs '
111
- output-file-path : examples/benchmarkjs/output .txt
113
+ name : Catch2 Benchmark
114
+ tool : ' catch2 '
115
+ output-file-path : examples/catch2/benchmark_result .txt
112
116
fail-on-alert : true
113
117
gh-repository : ' github.com/benchmark-action/github-action-benchmark-results'
114
118
github-token : ${{ secrets.GITHUB_TOKEN }}
115
- - run : node ./dist/scripts/ci_validate_modification.js before_data.js 'Benchmark.js Benchmark' './benchmark-data-repository'
119
+ - run : node ./dist/scripts/ci_validate_modification.js before_data.js 'Catch2 Benchmark' './benchmark-data-repository'
116
120
117
- pytest-benchmark :
118
- name : Run Pytest benchmark example - github.com/benchmark-action/github-action-benchmark-results
119
- runs-on : ubuntu-latest
121
+ cpp-framework :
122
+ name : Run Google C++ Benchmark Framework example - github.com/benchmark-action/github-action-benchmark-results
123
+ runs-on : ubuntu-20.04
120
124
steps :
121
125
- uses : actions/checkout@v4
122
126
- uses : actions/setup-node@v4
123
127
with :
124
128
node-version : 20
125
129
cache : ' npm'
126
- - uses : actions/setup-python@v5
127
- with :
128
- python-version : 3.9
129
130
- run : npm ci
130
131
- run : npm run build
132
+ - name : Cache Benchmark library
133
+ uses : actions/cache@v4
134
+ with :
135
+ path : examples/cpp/benchmark
136
+ key : ${{ runner.os }}-googlebenchmark-v1.5.0
131
137
- name : Run benchmark
132
138
run : |
133
- cd examples/pytest
134
- pip install -r requirements.txt
135
- pytest bench.py --benchmark-json output.json
139
+ cd examples/cpp
140
+ make json
136
141
137
142
- uses : actions/checkout@v4
138
143
with :
@@ -146,34 +151,30 @@ jobs:
146
151
- name : Store benchmark result
147
152
uses : ./
148
153
with :
149
- name : Python Benchmark with pytest-benchmark
150
- tool : ' pytest '
151
- output-file-path : examples/pytest/output .json
154
+ name : C++ Benchmark
155
+ tool : ' googlecpp '
156
+ output-file-path : examples/cpp/benchmark_result .json
152
157
fail-on-alert : true
153
158
gh-repository : ' github.com/benchmark-action/github-action-benchmark-results'
154
159
github-token : ${{ secrets.GITHUB_TOKEN }}
155
- - run : node ./dist/scripts/ci_validate_modification.js before_data.js 'Python Benchmark with pytest-benchmark ' './benchmark-data-repository'
160
+ - run : node ./dist/scripts/ci_validate_modification.js before_data.js 'C++ Benchmark' './benchmark-data-repository'
156
161
157
- google-benchmark-framework :
158
- name : Run Google C++ Benchmark Framework example - github.com/benchmark-action/github-action-benchmark-results
159
- runs-on : ubuntu-20.04
162
+ go :
163
+ name : Run Go benchmark example - github.com/benchmark-action/github-action-benchmark-results
164
+ runs-on : ubuntu-latest
160
165
steps :
161
166
- uses : actions/checkout@v4
162
167
- uses : actions/setup-node@v4
163
168
with :
164
169
node-version : 20
165
170
cache : ' npm'
171
+ - uses : actions/setup-go@v4
172
+ with :
173
+ go-version : " stable"
166
174
- run : npm ci
167
175
- run : npm run build
168
- - name : Cache Benchmark library
169
- uses : actions/cache@v4
170
- with :
171
- path : examples/cpp/benchmark
172
- key : ${{ runner.os }}-googlebenchmark-v1.5.0
173
176
- name : Run benchmark
174
- run : |
175
- cd examples/cpp
176
- make json
177
+ run : cd examples/go && go test -bench 'BenchmarkFib' | tee output.txt
177
178
178
179
- uses : actions/checkout@v4
179
180
with :
@@ -187,33 +188,34 @@ jobs:
187
188
- name : Store benchmark result
188
189
uses : ./
189
190
with :
190
- name : C++ Benchmark
191
- tool : ' googlecpp '
192
- output-file-path : examples/cpp/benchmark_result.json
191
+ name : Go Benchmark
192
+ tool : ' go '
193
+ output-file-path : examples/go/output.txt
193
194
fail-on-alert : true
194
195
gh-repository : ' github.com/benchmark-action/github-action-benchmark-results'
195
196
github-token : ${{ secrets.GITHUB_TOKEN }}
196
- - run : node ./dist/scripts/ci_validate_modification.js before_data.js 'C++ Benchmark' './benchmark-data-repository'
197
+ - run : node ./dist/scripts/ci_validate_modification.js before_data.js 'Go Benchmark' './benchmark-data-repository'
197
198
198
- catch2-framework :
199
- name : Run Catch2 C++ Benchmark Framework example - github.com/benchmark-action/github-action-benchmark-results
200
- runs-on : ubuntu-20.04
199
+ java-jmh :
200
+ name : Run JMH Java Benchmark Framework example
201
+ runs-on : ubuntu-latest
201
202
steps :
202
203
- uses : actions/checkout@v4
203
204
- uses : actions/setup-node@v4
204
205
with :
205
206
node-version : 20
206
207
cache : ' npm'
208
+ - uses : actions/setup-java@v4
209
+ with :
210
+ distribution : ' adopt'
211
+ java-version : ' 11'
207
212
- run : npm ci
208
213
- run : npm run build
209
214
- name : Run benchmark
210
215
run : |
211
- cd examples/catch2
212
- mkdir build && cd build
213
- cmake -DCMAKE_BUILD_TYPE=Release ..
214
- cmake --build . --config Release
215
- ./Catch2_bench > ../benchmark_result.txt
216
-
216
+ cd examples/java
217
+ mvn clean verify
218
+ java -jar target/benchmarks.jar -wi 1 -i 3 -f 1 -rf json
217
219
- uses : actions/checkout@v4
218
220
with :
219
221
repository : benchmark-action/github-action-benchmark-results
@@ -222,17 +224,16 @@ jobs:
222
224
- name : Save previous data.js
223
225
run : |
224
226
cp ./dist/other-repo/dev/bench/data.js before_data.js
225
-
226
227
- name : Store benchmark result
227
228
uses : ./
228
229
with :
229
- name : Catch2 Benchmark
230
- tool : ' catch2 '
231
- output-file-path : examples/catch2/benchmark_result.txt
230
+ name : JMH Benchmark
231
+ tool : " jmh "
232
+ output-file-path : examples/java/jmh-result.json
232
233
fail-on-alert : true
233
234
gh-repository : ' github.com/benchmark-action/github-action-benchmark-results'
234
235
github-token : ${{ secrets.GITHUB_TOKEN }}
235
- - run : node ./dist/scripts/ci_validate_modification.js before_data.js 'Catch2 Benchmark' './benchmark-data-repository'
236
+ - run : node ./dist/scripts/ci_validate_modification.js before_data.js 'JMH Benchmark' './benchmark-data-repository'
236
237
237
238
julia-benchmark :
238
239
name : Run Julia benchmark example - github.com/benchmark-action/github-action-benchmark-results
@@ -277,22 +278,60 @@ jobs:
277
278
github-token : ${{ secrets.GITHUB_TOKEN }}
278
279
- run : node ./dist/scripts/ci_validate_modification.js before_data.js 'Julia benchmark' './benchmark-data-repository'
279
280
280
- benchmarkdotnet-framework :
281
- name : Run Benchmark.Net .Net Benchmark Framework example - github.com/benchmark-action/github-action-benchmark-results
281
+ pytest-benchmark :
282
+ name : Run Pytest benchmark example - github.com/benchmark-action/github-action-benchmark-results
282
283
runs-on : ubuntu-latest
283
284
steps :
284
285
- uses : actions/checkout@v4
285
- - uses : actions/setup-dotnet@v3
286
+ - uses : actions/setup-node@v4
286
287
with :
287
- dotnet-version : ' 6.0.101' # SDK Version to use. keep in line with examples/benchmarkdotnet/global.json
288
+ node-version : 20
289
+ cache : ' npm'
290
+ - uses : actions/setup-python@v5
291
+ with :
292
+ python-version : 3.9
293
+ - run : npm ci
294
+ - run : npm run build
295
+ - name : Run benchmark
296
+ run : |
297
+ cd examples/pytest
298
+ pip install -r requirements.txt
299
+ pytest bench.py --benchmark-json output.json
300
+
301
+ - uses : actions/checkout@v4
302
+ with :
303
+ repository : benchmark-action/github-action-benchmark-results
304
+ ref : ' gh-pages'
305
+ path : ' dist/other-repo'
306
+ - name : Save previous data.js
307
+ run : |
308
+ cp ./dist/other-repo/dev/bench/data.js before_data.js
309
+
310
+ - name : Store benchmark result
311
+ uses : ./
312
+ with :
313
+ name : Python Benchmark with pytest-benchmark
314
+ tool : ' pytest'
315
+ output-file-path : examples/pytest/output.json
316
+ fail-on-alert : true
317
+ gh-repository : ' github.com/benchmark-action/github-action-benchmark-results'
318
+ github-token : ${{ secrets.GITHUB_TOKEN }}
319
+ - run : node ./dist/scripts/ci_validate_modification.js before_data.js 'Python Benchmark with pytest-benchmark' './benchmark-data-repository'
320
+
321
+ rust :
322
+ name : Run Rust benchmark example - github.com/benchmark-action/github-action-benchmark-results
323
+ runs-on : ubuntu-latest
324
+ steps :
325
+ - uses : actions/checkout@v4
288
326
- uses : actions/setup-node@v4
289
327
with :
290
328
node-version : 20
291
329
cache : ' npm'
292
330
- run : npm ci
293
331
- run : npm run build
332
+ - run : rustup toolchain update nightly && rustup default nightly
294
333
- name : Run benchmark
295
- run : cd examples/benchmarkdotnet && dotnet run --exporters json --filter '*'
334
+ run : cd examples/rust && cargo +nightly bench | tee output.txt
296
335
297
336
- uses : actions/checkout@v4
298
337
with :
@@ -306,13 +345,48 @@ jobs:
306
345
- name : Store benchmark result
307
346
uses : ./
308
347
with :
309
- name : Benchmark.Net Benchmark
310
- tool : ' benchmarkdotnet '
311
- output-file-path : examples/benchmarkdotnet/BenchmarkDotNet.Artifacts/results/Sample.Benchmarks-report-full-compressed.json
348
+ name : Rust Benchmark
349
+ tool : ' cargo '
350
+ output-file-path : examples/rust/output.txt
312
351
fail-on-alert : true
313
352
gh-repository : ' github.com/benchmark-action/github-action-benchmark-results'
314
353
github-token : ${{ secrets.GITHUB_TOKEN }}
315
- - run : node ./dist/scripts/ci_validate_modification.js before_data.js 'Benchmark.Net Benchmark' './benchmark-data-repository'
354
+ - run : node ./dist/scripts/ci_validate_modification.js before_data.js 'Rust Benchmark' './benchmark-data-repository'
355
+
356
+ rust-criterion-rs-framework :
357
+ name : Run Criterion.rs benchmark example - github.com/benchmark-action/github-action-benchmark-results
358
+ runs-on : ubuntu-latest
359
+ steps :
360
+ - uses : actions/checkout@v4
361
+ - uses : actions/setup-node@v4
362
+ with :
363
+ node-version : 20
364
+ cache : ' npm'
365
+ - run : npm ci
366
+ - run : npm run build
367
+ - run : rustup toolchain update nightly && rustup default nightly
368
+ - name : Run benchmark
369
+ run : cd examples/criterion-rs && cargo +nightly bench -- --output-format bencher | tee output.txt
370
+
371
+ - uses : actions/checkout@v4
372
+ with :
373
+ repository : benchmark-action/github-action-benchmark-results
374
+ ref : ' gh-pages'
375
+ path : ' dist/other-repo'
376
+ - name : Save previous data.js
377
+ run : |
378
+ cp ./dist/other-repo/dev/bench/data.js before_data.js
379
+
380
+ - name : Store benchmark result
381
+ uses : benchmark-action/github-action-benchmark@v1
382
+ with :
383
+ name : Criterion.rs Benchmark
384
+ tool : ' cargo'
385
+ output-file-path : examples/criterion-rs/output.txt
386
+ fail-on-alert : true
387
+ gh-repository : ' github.com/benchmark-action/github-action-benchmark-results'
388
+ github-token : ${{ secrets.GITHUB_TOKEN }}
389
+ - run : node ./dist/scripts/ci_validate_modification.js before_data.js 'Criterion.rs Benchmark' './benchmark-data-repository'
316
390
317
391
only-alert-with-cache :
318
392
name : Run alert check with actions/cache
0 commit comments