Skip to content

Commit 7a0d14c

Browse files
committed
refactor(ci): split out benchmarking into its own on-demand job
1 parent 188dc9c commit 7a0d14c

File tree

2 files changed

+34
-5
lines changed

2 files changed

+34
-5
lines changed

.github/workflows/benchmark.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
on:
2+
workflow_dispatch:
3+
4+
name: Run benchmarks
5+
jobs:
6+
check:
7+
strategy:
8+
matrix:
9+
os:
10+
- ubuntu-20.04
11+
- macos-11
12+
- windows-2022
13+
runs-on: ${{ matrix.os }}
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
17+
18+
- name: Set up JDK
19+
uses: actions/setup-java@c3ac5dd0ed8db40fedb61c32fbe677e6b355e94c # v3.8.0
20+
with:
21+
distribution: temurin
22+
java-version: 18
23+
cache: gradle
24+
25+
- name: Cache Kotlin/Native compiler
26+
uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # v3.0.11
27+
with:
28+
path: ~/.konan
29+
key: ${{ runner.os }}-gradle-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties', 'settings.gradle.kts') }}
30+
31+
- name: Run benchmarks
32+
uses: gradle/gradle-build-action@3fbe033aaae657f011f88f29be9e65ed26bd29ef # v2.3.3
33+
with:
34+
arguments: :benchmark:benchmark -PenableNativeTargets --stacktrace

.github/workflows/check.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,3 @@ jobs:
3838
uses: gradle/gradle-build-action@3fbe033aaae657f011f88f29be9e65ed26bd29ef # v2.3.3
3939
with:
4040
arguments: check -PenableNativeTargets --stacktrace
41-
42-
- name: Run benchmarks
43-
uses: gradle/gradle-build-action@3fbe033aaae657f011f88f29be9e65ed26bd29ef # v2.3.3
44-
with:
45-
arguments: :benchmark:benchmark -PenableNativeTargets --stacktrace

0 commit comments

Comments
 (0)