Skip to content

Commit 3eb5b64

Browse files
authored
Merge pull request #481 from jawkio/optimize-benchmarks-release-workflow
Integrate benchmark publishing into the release workflow
2 parents 86d4bf5 + 97a705e commit 3eb5b64

2 files changed

Lines changed: 425 additions & 30 deletions

File tree

.github/workflows/benchmarks.yml

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
name: Publish Benchmarks
22

33
on:
4-
push:
5-
tags:
6-
- "*"
74
workflow_dispatch:
85
inputs:
96
ref:
@@ -47,18 +44,11 @@ jobs:
4744

4845
steps:
4946
- name: Checkout selected benchmark ref
50-
if: github.event_name == 'workflow_dispatch'
5147
uses: actions/checkout@v6
5248
with:
5349
fetch-depth: 0
5450
ref: ${{ inputs.ref || inputs.version || github.ref }}
5551

56-
- name: Checkout triggering ref
57-
if: github.event_name != 'workflow_dispatch'
58-
uses: actions/checkout@v6
59-
with:
60-
fetch-depth: 0
61-
6252
- name: Set up Temurin JDK 17
6353
uses: actions/setup-java@v5
6454
with:
@@ -76,19 +66,11 @@ jobs:
7666
INPUT_JMH_ARGS: ${{ inputs.jmhArgs }}
7767
INPUT_PUBLISH: ${{ inputs.publish }}
7868
run: |
79-
if [ "${{ github.event_name }}" = "push" ]; then
80-
ref="${GITHUB_REF_NAME}"
81-
version="${GITHUB_REF_NAME}"
82-
pattern="${DEFAULT_JMH_PATTERN}"
83-
jmh_args=""
84-
publish="true"
85-
else
86-
ref="${INPUT_REF:-${INPUT_VERSION:-${GITHUB_REF_NAME}}}"
87-
version="${INPUT_VERSION}"
88-
pattern="${INPUT_PATTERN}"
89-
jmh_args="${INPUT_JMH_ARGS}"
90-
publish="${INPUT_PUBLISH}"
91-
fi
69+
ref="${INPUT_REF:-${INPUT_VERSION:-${GITHUB_REF_NAME}}}"
70+
version="${INPUT_VERSION}"
71+
pattern="${INPUT_PATTERN}"
72+
jmh_args="${INPUT_JMH_ARGS}"
73+
publish="${INPUT_PUBLISH}"
9274
9375
if [ -z "${ref}" ]; then
9476
ref="main"

0 commit comments

Comments
 (0)