Repository navigation
276 lines (238 loc) · 8.83 KB
/
Copy pathperformance.yml
File metadata and controls
276 lines (238 loc) · 8.83 KB
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
name: Performance
on:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: performance-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
ios-footprint:
name: iOS incremental footprint
runs-on: macos-15
timeout-minutes: 60
steps:
- name: Check out repository
uses: actions/checkout@v7
- name: Set up JDK 17
uses: actions/setup-java@v6
with:
distribution: temurin
java-version: "17"
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v6.4.1
- name: Link paired final binaries and enforce NFR-2
run: bash scripts/verify-ios-core-footprint.sh
- name: Upload iOS footprint evidence
if: always()
uses: actions/upload-artifact@v7
with:
name: ios-footprint-${{ github.run_id }}
if-no-files-found: error
path: |
build/ios-footprint/report.json
build/ios-footprint/baseline
build/ios-footprint/core
jvm:
name: JVM performance gates
runs-on: ubuntu-24.04
timeout-minutes: 90
steps:
- name: Check out repository
uses: actions/checkout@v7
- name: Set up JDK 17
uses: actions/setup-java@v6
with:
distribution: temurin
java-version: "17"
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v6.4.1
- name: Prepare pinned Chasm and CoreMark fixture
shell: bash
run: |
coremark_path="$(scripts/prepare-benchmark-upstreams.sh)"
echo "KWASM_COREMARK_WASM=${coremark_path}" >> "$GITHUB_ENV"
- name: Test gate and run JVM benchmark
shell: bash
run: |
set -euo pipefail
./gradlew --stacktrace \
:benchmarks:jvmExternalComparisonReport
./gradlew --stacktrace \
:benchmarks:performanceGateToolTest \
:benchmarks:jvmPerformanceGate \
-Pkwasm.benchmark.externalComparisons=benchmarks/build/performance/external-comparisons-jvm.json \
-Pkwasm.benchmark.enforceCheckpointOverhead=false
- name: Upload JVM evidence
if: always()
uses: actions/upload-artifact@v7
with:
name: performance-jvm-${{ github.run_id }}
if-no-files-found: warn
path: |
benchmarks/build/reports/benchmarks/main/**/jvm.json
benchmarks/build/reports/benchmarks/externalComparison/**/jvm.json
benchmarks/build/performance/current-jvm.json
benchmarks/build/performance/external-current-jvm.json
benchmarks/build/performance/external-comparisons-jvm.json
benchmarks/build/performance/gate-jvm.json
native:
name: ${{ matrix.target }} performance gates
runs-on: ${{ matrix.runner }}
timeout-minutes: 120
strategy:
fail-fast: false
matrix:
include:
- target: linuxX64
runner: ubuntu-24.04
- target: macosArm64
runner: macos-15
steps:
- name: Check out repository
uses: actions/checkout@v7
- name: Set up JDK 17
uses: actions/setup-java@v6
with:
distribution: temurin
java-version: "17"
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v6.4.1
- name: Prepare pinned Chasm and CoreMark fixture
shell: bash
run: |
coremark_path="$(scripts/prepare-benchmark-upstreams.sh)"
echo "KWASM_COREMARK_WASM=${coremark_path}" >> "$GITHUB_ENV"
- name: Run Native benchmark and gate
shell: bash
env:
KWASM_TARGET: ${{ matrix.target }}
run: |
set -euo pipefail
./gradlew --stacktrace \
":benchmarks:${KWASM_TARGET}ExternalComparisonReport"
./gradlew --stacktrace \
":benchmarks:${KWASM_TARGET}PerformanceGate" \
"-Pkwasm.benchmark.externalComparisons=benchmarks/build/performance/external-comparisons-${KWASM_TARGET}.json" \
-Pkwasm.benchmark.enforceCheckpointOverhead=false
- name: Upload Native evidence
if: always()
uses: actions/upload-artifact@v7
with:
name: performance-${{ matrix.target }}-${{ github.run_id }}
if-no-files-found: warn
path: |
benchmarks/build/reports/benchmarks/main/**/${{ matrix.target }}.json
benchmarks/build/reports/benchmarks/externalComparison/**/${{ matrix.target }}.json
benchmarks/build/performance/current-${{ matrix.target }}.json
benchmarks/build/performance/external-current-${{ matrix.target }}.json
benchmarks/build/performance/external-comparisons-${{ matrix.target }}.json
benchmarks/build/performance/gate-${{ matrix.target }}.json
compiled-reference:
name: ${{ matrix.target }} Wasmtime compiled reference
runs-on: ${{ matrix.runner }}
timeout-minutes: 120
strategy:
fail-fast: false
matrix:
include:
- target: jvm
runner: ubuntu-24.04
- target: linuxX64
runner: ubuntu-24.04
- target: macosArm64
runner: macos-15
steps:
- name: Check out repository
uses: actions/checkout@v7
- name: Set up JDK 17
uses: actions/setup-java@v6
with:
distribution: temurin
java-version: "17"
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v6.4.1
- name: Prepare pinned fixtures and Wasmtime C runner
shell: bash
run: |
set -euo pipefail
coremark_path="$(scripts/prepare-benchmark-upstreams.sh)"
wasmtime_runner="$(scripts/prepare-wasmtime-reference.sh)"
echo "KWASM_COREMARK_WASM=${coremark_path}" >> "$GITHUB_ENV"
echo "KWASM_WASMTIME_REFERENCE_RUNNER=${wasmtime_runner}" >> "$GITHUB_ENV"
- name: Run separate compiled-runtime reference
shell: bash
env:
KWASM_TARGET: ${{ matrix.target }}
run: |
set -euo pipefail
./gradlew --stacktrace \
":benchmarks:${KWASM_TARGET}CompiledReferenceReport"
- name: Upload compiled-reference evidence
if: always()
uses: actions/upload-artifact@v7
with:
name: compiled-reference-${{ matrix.target }}-${{ github.run_id }}
if-no-files-found: error
path: |
benchmarks/build/reports/benchmarks/compiledReference/**/${{ matrix.target }}.json
benchmarks/build/performance/compiled-reference-kwasm-${{ matrix.target }}.json
benchmarks/build/performance/compiled-reference-wasmtime-raw-${{ matrix.target }}.json
benchmarks/build/performance/compiled-reference-${{ matrix.target }}.json
native-image:
name: GraalVM native-image smoke
runs-on: ubuntu-24.04
timeout-minutes: 45
steps:
- name: Check out repository
uses: actions/checkout@v7
- name: Set up GraalVM 21
uses: graalvm/setup-graalvm@v1
with:
java-version: "21"
distribution: graalvm
github-token: ${{ secrets.GITHUB_TOKEN }}
native-image-job-reports: "true"
- name: Acknowledge experimental Native Image report option
shell: bash
run: |
set -euo pipefail
config_file="${NATIVE_IMAGE_CONFIG_FILE:?setup-graalvm did not configure Native Image reports}"
if ! grep -Fq -- '-H:BuildOutputJSONFile=' "$config_file"; then
echo "setup-graalvm did not configure the Native Image build report" >&2
exit 1
fi
sed -i \
's|^NativeImageArgs = \(.*\)$|NativeImageArgs = -H:+UnlockExperimentalVMOptions \1 -H:-UnlockExperimentalVMOptions|' \
"$config_file"
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v6.4.1
- name: Build application distribution
run: ./gradlew --stacktrace :samples-cli:installDist
- name: Compile and execute native image
shell: bash
run: |
set -euo pipefail
mapfile -d '' jars < <(
find wasm-cli/build/install/samples-cli/lib \
-type f \
-name '*.jar' \
-print0
)
if (( ${#jars[@]} == 0 )); then
echo "samples-cli distribution contains no jars" >&2
exit 1
fi
classpath="$(IFS=:; echo "${jars[*]}")"
mkdir -p build/native-image
native-image \
--no-fallback \
-cp "$classpath" \
io.heapy.kwasm.cli.SmokeTestKt \
build/native-image/kwasm-smoke
build/native-image/kwasm-smoke
- name: Upload native image
uses: actions/upload-artifact@v7
with:
name: native-image-smoke-${{ github.run_id }}
path: build/native-image/kwasm-smoke