-
-
Notifications
You must be signed in to change notification settings - Fork 17
129 lines (118 loc) · 4 KB
/
bench.ci.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
name: Benchmark
on:
push:
branches:
- stable
pull_request:
types: [opened, reopened, synchronize]
env:
BUILDLESS_APIKEY: ${{ secrets.BUILDLESS_APIKEY }}
permissions:
contents: read
jobs:
##
## Job: Benchmarks
##
bench:
strategy:
fail-fast: false
matrix:
os: [ubuntu]
java: [20]
engine: [graalvm]
experimental: [false]
include:
- os: macos
java: 20
engine: graalvm
experimental: false
name: "JVM"
runs-on: ${{ matrix.os }}-latest
continue-on-error: ${{ matrix.experimental }}
if: |
(
github.ref == 'refs/heads/stable' ||
github.ref == 'refs/heads/v3' ||
startsWith(github.ref, 'refs/tags/v') ||
contains(github.event.pull_request.labels.*.name, 'ci:bench') ||
contains(github.event.head_commit.message, 'ci:bench')
)
permissions:
actions: "read"
checks: "write"
contents: "write"
pull-requests: "write"
defaults:
run:
shell: bash
steps:
- name: Harden Runner
uses: step-security/harden-runner@8ca2b8b2ece13480cda6dacd3511b49857a23c09 # v2.5.1
with:
egress-policy: audit
- name: "Setup: Checkout"
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- name: "Setup: GraalVM"
uses: graalvm/setup-graalvm@0a27862568a8481fbfd3e2ce38c6445e34c0bed4 # v1.1.4
if: ${{ matrix.engine == 'graalvm' }}
with:
components: "native-image,js,wasm"
distribution: 'graalvm'
java-version: ${{ matrix.java }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: "Setup: Zulu"
uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3.13.0
if: ${{ matrix.engine != 'graalvm' }}
with:
distribution: ${{ matrix.engine }}
java-version: ${{ matrix.java }}
- name: "Setup: Node"
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
with:
node-version: 18
cache: "yarn"
- name: "Setup: Yarn"
run: yarn
- name: "Run Benchmarks"
uses: gradle/gradle-build-action@842c587ad8aa4c68eeba24c396e15af4c2e9f30a # v2.9.0
id: gradlebench
continue-on-error: ${{ matrix.experimental }}
env:
CI: true
GRADLE_CACHE_PUSH: false
with:
cache-read-only: true
arguments: |
:benchmarks:core:benchmark
:benchmarks:graalvm:benchmark
:benchmarks:server:benchmark
--no-daemon
--warning-mode=none
--dependency-verification=lenient
-Pelide.ci=true
-PbuildBenchmarks=true
-PbuildSamples=false
-PbuildDocs=false
-Pversions.java.language=${{ matrix.java }}
- name: "Locate Benchmark Report"
id: benchreport
run: |
echo "BENCHMARK_REPORT=$(find benchmarks/server/build/reports/benchmarks/main -name "*.json" | head -n 1)" >> $GITHUB_OUTPUT
- name: "Restore Previous Benchmark"
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3
with:
path: ./benchmark_reports
key: ${{ runner.os }}-${{ matrix.engine }}-${{ matrix.java }}-benchmark
- name: "Upload Benchmark Report"
uses: benchmark-action/github-action-benchmark@70405016b032d44f409e4b1b451c40215cbe2393 # v1.18.0
continue-on-error: true
with:
name: "Elide: Server (${{ matrix.os }}, ${{ matrix.engine }}, JDK ${{ matrix.java }})"
tool: "jmh"
auto-push: false
external-data-json-path: benchmark_reports/benchmark-data.json
comment-on-alert: true
comment-always: ${{ !matrix.experimental }}
output-file-path: ${{ steps.benchreport.outputs.BENCHMARK_REPORT }}
github-token: ${{ secrets.GITHUB_TOKEN }}
fail-on-alert: ${{ !matrix.experimental }}