0.24.0 #3432
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |