-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (71 loc) · 2.51 KB
/
jmh_benchmark.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: JMH Benchmark
on:
push:
branches: [ master ]
paths-ignore:
- '**.md'
pull_request:
branches: [ master ]
paths-ignore:
- '**.md'
permissions:
# deployments permission to deploy GitHub pages website
deployments: write
# contents permission to update benchmark contents in gh-pages branch
contents: write
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
jobs:
benchmark-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: 11
distribution: 'adopt'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Run Benchmark
run: ./gradlew jmh convertJmhResultForGithubActions --no-daemon
# Download previous benchmark result from cache (if exists)
- name: Download previous benchmark data
uses: actions/cache@v1
with:
path: ./cache
key: ${{ runner.os }}-benchmark
# Run `github-action-benchmark` action
- name: Store benchmark result
if: ${{ github.EVENT_NAME == 'pull_request' }}
uses: benchmark-action/github-action-benchmark@3d3bca03e83647895ef4f911fa57de3c7a391aaf
with:
name: Card orchestrator benchmark
tool: 'customSmallerIsBetter'
output-file-path: ./build/results/jmh/results-gh-benchmark.json
external-data-json-path: ./cache/benchmark-data.json
alert-threshold: '150%'
comment-always: false
fail-on-alert: true
comment-on-alert: true
github-token: ${{ secrets.GITHUB_TOKEN }}
# export the result to gh pages only on pushing the changes to master
auto-push: false
# Push gh-pages branch by yourself
- name: Push benchmark result
if: ${{ github.EVENT_NAME == 'push' }}
uses: benchmark-action/github-action-benchmark@3d3bca03e83647895ef4f911fa57de3c7a391aaf
with:
name: Card orchestrator benchmark
tool: 'customSmallerIsBetter'
output-file-path: ./build/results/jmh/results-gh-benchmark.json
alert-threshold: '150%'
comment-always: false
fail-on-alert: true
comment-on-alert: true
github-token: ${{ secrets.GITHUB_TOKEN }}
# export the result to gh pages only on pushing the changes to master
auto-push: true