Skip to content

Commit 12f3154

Browse files
author
Julien Ruaux
committed
feat: Added benchmark job
1 parent 7629a74 commit 12f3154

File tree

1 file changed

+63
-0
lines changed

1 file changed

+63
-0
lines changed

.github/workflows/benchmark.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: 'Early Access'
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
java-version:
7+
default: '19'
8+
required: false
9+
type: string
10+
jmh-results-path:
11+
default: 'jmh/results.txt'
12+
required: false
13+
type: string
14+
secrets:
15+
github-token:
16+
required: true
17+
18+
jobs:
19+
earlyaccess:
20+
name: 'Early Access'
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Cancel previous run
24+
uses: styfle/cancel-workflow-action@0.11.0
25+
with:
26+
access_token: ${{ secrets.github-token }}
27+
28+
- name: Checkout
29+
uses: actions/checkout@v3
30+
with:
31+
fetch-depth: 0
32+
33+
- name: Set up Java
34+
uses: actions/setup-java@v3
35+
with:
36+
java-version: ${{ inputs.java-version }}
37+
distribution: 'zulu'
38+
39+
- name: Cache Gradle
40+
uses: actions/cache@v3
41+
with:
42+
path: ~/.gradle/caches
43+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}-${{ hashFiles('**/gradle.properties') }}
44+
restore-keys: ${{ runner.os }}-gradle-
45+
46+
- name: Cache Gradle wrapper
47+
uses: actions/cache@v3
48+
with:
49+
path: ~/.gradle/wrapper
50+
key: ${{ runner.os }}-gradlew-${{ hashFiles('**/gradlew') }}
51+
restore-keys: ${{ runner.os }}-gradlew-
52+
53+
- name: Build
54+
run: |
55+
./gradlew jmh -S
56+
57+
- name: Upload benchmark report
58+
if: failure()
59+
uses: actions/upload-artifact@v3
60+
with:
61+
name: benchmark-report
62+
path: |
63+
${{ inputs.jmh-results-path }}

0 commit comments

Comments
 (0)