-
Notifications
You must be signed in to change notification settings - Fork 0
89 lines (76 loc) · 2.71 KB
/
Copy pathbenchmark.yml
File metadata and controls
89 lines (76 loc) · 2.71 KB
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
name: Benchmark
on:
push:
branches:
- main
paths:
- 'sandbox-benchmarks/**'
- 'sandbox-functional-converter-core/**'
- 'sandbox-ast-api/**'
- '.github/workflows/benchmark.yml'
pull_request:
branches:
- main
paths:
- 'sandbox-benchmarks/**'
- 'sandbox-functional-converter-core/**'
- 'sandbox-ast-api/**'
- '.github/workflows/benchmark.yml'
workflow_dispatch:
jobs:
benchmark:
runs-on: ubuntu-latest
permissions:
contents: write # Required: auto-push benchmark results to gh-pages
deployments: write # Required: create deployment status for benchmark
pull-requests: write # Required: post alert comments on PRs
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set up JDK 21
uses: actions/setup-java@v5
with:
java-version: '21'
distribution: 'temurin'
cache: maven
- name: Install Parent POM
run: mvn install -N -DskipTests
- name: Build Core Module
working-directory: sandbox-functional-converter-core
run: mvn clean install -DskipTests
- name: Build AST API Module
working-directory: sandbox-ast-api
run: mvn clean install -DskipTests
- name: Build Benchmark Module
working-directory: sandbox-benchmarks
run: mvn clean package
- name: Run Benchmarks
working-directory: sandbox-benchmarks
run: |
java -jar target/benchmarks.jar -rf json -rff target/jmh-result.json
- name: Store Benchmark Results
uses: benchmark-action/github-action-benchmark@v1
with:
name: JMH Benchmarks
tool: 'jmh'
output-file-path: sandbox-benchmarks/target/jmh-result.json
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
alert-threshold: '115%'
comment-on-alert: true
fail-on-alert: false
alert-comment-cc-users: '@carstenartur'
- name: Upload Benchmark Results
uses: actions/upload-artifact@v7
if: always()
with:
name: benchmark-results
path: |
sandbox-benchmarks/target/jmh-result.json
sandbox-benchmarks/target/jmh-result.txt
- name: Report Deployed URL
if: always()
run: |
echo "### 🔗 Deployed Benchmark Results" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "📊 [View Performance Charts](https://carstenartur.github.io/sandbox/dev/bench/)" >> $GITHUB_STEP_SUMMARY