-
Notifications
You must be signed in to change notification settings - Fork 108
90 lines (78 loc) · 2.5 KB
/
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
82
83
84
85
86
87
88
89
90
name: Benchmark
on:
push:
branches:
- develop
- master
paths:
- 'src/**'
- '.github/workflows/benchmark.yml'
- '.github/scripts/*.*'
- '*gradle*'
- 'gradle/wrapper/gradle-wrapper.properties'
- 'lombok.config'
pull_request:
paths:
- 'src/**'
- '.github/workflows/benchmark.yml'
- '.github/scripts/*.*'
- '*gradle*'
- 'gradle/wrapper/gradle-wrapper.properties'
- 'lombok.config'
jobs:
Benchmark:
runs-on: self-hosted
steps:
- name: Checkout project
uses: actions/checkout@v3
- name: Setup JDK
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'temurin'
cache: gradle
- name: Build with Gradle
run: ./gradlew bootJar
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.7"
- name: Setup Python libs
run: pip install pytest pytest-benchmark && pip install pybadges
- name: Download SSL 3.1
run: git clone https://github.com/1c-syntax/ssl_3_1.git ssl
- name: Analyze ssl
run: pytest .github/scripts/benchmark.py --benchmark-min-rounds=3 --benchmark-timer=time.time --benchmark-json=output.json --benchmark-verbose
- name: Archive results in SARIF
uses: actions/upload-artifact@v4
with:
name: "SARIF report"
path: bsl-ls.sarif
- name: Generation badge benchmark
if: github.event_name == 'push'
run: python .github/scripts/gen-bandge.py
- name: Check benchmark result for pull request
if: github.event_name == 'pull_request'
uses: otymko/[email protected]
with:
name: BSL LS perfomance measurement (SSL 3.1)
tool: "pytest"
output-file-path: output.json
github-token: ${{ secrets.GITHUB_TOKEN }}
alert-threshold: "110%"
comment-on-alert: true
fail-on-alert: false
alert-comment-cc-users: "@otymko"
- name: Store benchmark result into branch
if: github.event_name == 'push'
uses: otymko/[email protected]
with:
name: BSL LS perfomance measurement (SSL 3.1)
tool: "pytest"
output-file-path: output.json
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: true
alert-threshold: "110%"
comment-on-alert: true
fail-on-alert: false
alert-comment-cc-users: "@otymko"