Skip to content

Commit 5a01eab

Browse files
committed
push benchmark data to dedicated branch
1 parent 717804e commit 5a01eab

1 file changed

Lines changed: 22 additions & 29 deletions

File tree

.github/workflows/benchmarks.yml

Lines changed: 22 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,59 +2,52 @@ name: Benchmarks
22

33
on:
44
schedule:
5-
- cron: '0 1 * * *' # nightly build at 1 AM UTC
6-
workflow_dispatch: # allow manual trigger
5+
- cron: '0 1 * * *'
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: write # required for auto-push
10+
11+
concurrency:
12+
group: benchmarks # serialize cron + manual runs
13+
cancel-in-progress: false
714

815
jobs:
916
benchmark:
1017
name: Execute JMH benchmarks
1118
runs-on: ubuntu-latest
1219
timeout-minutes: 60
1320
steps:
14-
- name: Checkout project
15-
uses: actions/checkout@v6
21+
- uses: actions/checkout@v6
1622

17-
- name: Set up Java
18-
uses: actions/setup-java@v5
23+
- uses: actions/setup-java@v5
1924
with:
2025
java-version: '8'
2126
distribution: 'temurin'
2227
cache: 'maven'
2328

24-
- name: Setup Maven
25-
uses: s4u/setup-maven-action@v1.20.0
26-
with:
27-
java-version: 8
28-
2929
- name: Maven offline dependencies
30-
run: |
31-
mvn -q dependency:go-offline
30+
run: mvn -q dependency:go-offline
3231

3332
- name: Run JMH benchmarks
34-
run: |
35-
mvn -Pjmh clean test
33+
run: mvn -Pjmh clean test
3634
env:
3735
JVM_OPTS: -Xmx3200m
3836
TERM: dumb
39-
# Download previous benchmark result from cache (if exists)
40-
- name: Download previous benchmark data
41-
uses: actions/cache@v5
42-
with:
43-
path: ./cache
44-
key: ${{ runner.os }}-benchmark
45-
# Store benchmark result and compare with previous runs
37+
38+
- name: Verify JMH output exists
39+
run: test -s benchmarks.json
40+
4641
- name: Store benchmark result
4742
uses: benchmark-action/github-action-benchmark@v1
4843
with:
4944
tool: 'jmh'
45+
output-file-path: benchmarks.json
5046
github-token: ${{ secrets.GITHUB_TOKEN }}
51-
comment-on-alert: false
52-
# Uncomment to enable automatic pushes to gh-pages
5347
auto-push: true
54-
gh-repository: 'github.com/redis/jedis'
55-
gh-pages-branch: 'master'
56-
benchmark-data-dir-path: './docs/static/benchmarks'
57-
output-file-path: benchmarks.json
48+
gh-pages-branch: benchmark-data # NOT master
49+
benchmark-data-dir-path: 'jedis' # path inside that branch
5850
fail-on-alert: false
5951
alert-threshold: '200%'
60-
alert-comment-cc-users: '@ggivo'
52+
comment-on-alert: false
53+
alert-comment-cc-users: '@ggivo'

0 commit comments

Comments
 (0)