-
Notifications
You must be signed in to change notification settings - Fork 73
42 lines (40 loc) · 1.16 KB
/
benchmarks.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
name: Run benchmarks
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
jmh_benchmark:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup JDK 17
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
- name: Build client
run: |
mvn clean install -DskipTests
- name: Get project version
id: unleash
run: |
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
echo "::set-output name=version::$VERSION"
- name: Build and run benchmark
run: |
cd ./benches/jmh/unleash-client-benches
mvn clean install -Dunleash.version=${{ steps.unleash.outputs.version }}
java -jar target/benchmarks.jar -w1 -rf json -rff output.json
- name: JMH Benchmark Action
uses: kitlangton/jmh-benchmark-action@main
with:
jmh-output-path: benches/jmh/unleash-client-benches/output.json
github-token: ${{ secrets.GITHUB_TOKEN }}