-
Notifications
You must be signed in to change notification settings - Fork 0
241 lines (218 loc) · 7.95 KB
/
Copy pathpinned-conformance.yml
File metadata and controls
241 lines (218 loc) · 7.95 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
name: Pinned conformance
on:
schedule:
- cron: "17 3 * * 1"
workflow_dispatch:
permissions:
contents: read
concurrency:
group: pinned-conformance-${{ github.ref }}
cancel-in-progress: false
env:
SPEC_TAG: wg-3.0
SPEC_COMMIT: 9d36019973201a19f9c9ebb0f10828b2fe2374aa
WABT_COMMIT: 11602da5423eb9c7517311ed01917ea231594170
WASI_TESTSUITE_COMMIT: caf3b66fa3457cc17156864d971387a7e9f5933b
jobs:
wasm-core:
name: Wasm 3.0 core / ${{ matrix.name }}
runs-on: ${{ matrix.runner }}
timeout-minutes: 150
strategy:
fail-fast: false
matrix:
include:
- name: JVM + Linux x64 Native
id: jvm-linux-x64
runner: ubuntu-24.04
tasks: ":tck:jvmTest :tck:linuxX64Test"
- name: Linux arm64 Native
id: linux-arm64
runner: ubuntu-24.04
tasks: ":tck:compileTestKotlinLinuxArm64"
- name: macOS arm64 Native
id: macos-arm64-ios-simulator
runner: macos-15
tasks: ":tck:macosArm64Test :tck:iosSimulatorArm64Test"
steps:
- name: Check out kwasm
uses: actions/checkout@v7
- name: Check out WebAssembly spec wg-3.0
uses: actions/checkout@v7
with:
repository: WebAssembly/spec
ref: wg-3.0
path: upstream/spec
fetch-depth: 1
- name: Check out pinned WABT
uses: actions/checkout@v7
with:
repository: WebAssembly/wabt
ref: 11602da5423eb9c7517311ed01917ea231594170
path: upstream/wabt
fetch-depth: 1
submodules: recursive
- name: Verify pins and stage the top-level Wasm 3.0 core corpus
shell: bash
run: |
set -euo pipefail
test "$(git -C upstream/spec rev-parse HEAD)" = "$SPEC_COMMIT"
test "$(git -C upstream/wabt rev-parse HEAD)" = "$WABT_COMMIT"
mkdir -p upstream/spec-core-wg3
for source_script in upstream/spec/test/core/*.wast; do
cp "$source_script" upstream/spec-core-wg3/
done
staged_scripts=(upstream/spec-core-wg3/*.wast)
test "${#staged_scripts[@]}" = "97"
- name: Build pinned wast2json
shell: bash
run: |
set -euo pipefail
cmake -S upstream/wabt -B upstream/wabt/build \
-DBUILD_TESTS=OFF \
-DBUILD_TOOLS=ON
cmake --build upstream/wabt/build --target wast2json --parallel 2
test -x upstream/wabt/build/wast2json
- name: Set up JDK 17
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: "17"
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v6.3.0
- name: Run generated core corpus
id: conformance
shell: bash
env:
GRADLE_TASKS: ${{ matrix.tasks }}
run: |
set -euo pipefail
mkdir -p artifacts
read -r -a gradle_tasks <<< "$GRADLE_TASKS"
./gradlew --stacktrace --console=plain \
:tck:verifyTckExclusions \
:tck:verifyWast2JsonExclusions \
"${gradle_tasks[@]}" \
-Pkwasm.tck.wastDir="$GITHUB_WORKSPACE/upstream/spec-core-wg3" \
-Pkwasm.tck.converterExclusions=wg-3.0 \
-Pkwasm.wabt.wast2json="$GITHUB_WORKSPACE/upstream/wabt/build/wast2json" \
2>&1 | tee "artifacts/core-${{ matrix.id }}.log"
- name: Write core conformance summary
if: always()
shell: bash
run: |
mkdir -p artifacts
{
echo "## Pinned Wasm 3.0 core — ${{ matrix.name }}"
echo
echo "- Result: **${{ steps.conformance.outcome }}**"
echo "- WebAssembly spec: \`$SPEC_TAG\` at \`$SPEC_COMMIT\`"
echo "- WABT: \`$WABT_COMMIT\`"
echo "- Scope: 97 top-level core scripts"
echo "- Eight issue-backed converter exclusions are not generated or executed."
grep -Rho "kwasm generated[^<]*" \
wasm-tck/build/test-results 2>/dev/null | sort -u || true
if test -f wasm-tck/build/generated/tck/_conversion-summary.txt; then
echo
echo '```text'
cat wasm-tck/build/generated/tck/_conversion-summary.txt
echo '```'
fi
} | tee "artifacts/core-${{ matrix.id }}-summary.md" >> "$GITHUB_STEP_SUMMARY"
- name: Upload core conformance evidence
if: always()
uses: actions/upload-artifact@v7
with:
name: pinned-core-${{ matrix.id }}
if-no-files-found: error
retention-days: 14
path: |
artifacts/
wasm-tck/build/generated/tck/_conversion-summary.txt
wasm-tck/build/test-results/
wasm-tck/build/reports/tests/
wasi-preview1:
name: WASI Preview 1 full corpus / ${{ matrix.name }}
runs-on: ${{ matrix.runner }}
timeout-minutes: 90
strategy:
fail-fast: false
matrix:
include:
- name: JVM
id: jvm
runner: ubuntu-24.04
tasks: ":tck:jvmTest"
- name: macOS arm64 Native
id: macos-arm64
runner: macos-15
tasks: ":tck:macosArm64Test"
steps:
- name: Check out kwasm
uses: actions/checkout@v7
- name: Check out pinned official WASI testsuite
uses: actions/checkout@v7
with:
repository: WebAssembly/wasi-testsuite
ref: caf3b66fa3457cc17156864d971387a7e9f5933b
path: upstream/wasi-testsuite
fetch-depth: 1
- name: Verify WASI testsuite pin and complete Preview 1 corpus
shell: bash
run: |
set -euo pipefail
test "$(git -C upstream/wasi-testsuite rev-parse HEAD)" = "$WASI_TESTSUITE_COMMIT"
preview1_fixture_count="$(
find upstream/wasi-testsuite -type f \
-path '*/wasm32-wasip1/*.wasm' -print |
wc -l |
tr -d '[:space:]'
)"
test "$preview1_fixture_count" = "72"
- name: Set up JDK 17
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: "17"
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v6.3.0
- name: Run complete official Preview 1 corpus
id: conformance
shell: bash
env:
GRADLE_TASKS: ${{ matrix.tasks }}
run: |
set -euo pipefail
mkdir -p artifacts
read -r -a gradle_tasks <<< "$GRADLE_TASKS"
./gradlew --stacktrace --console=plain \
:tck:verifyWasiTestsuiteExclusions \
"${gradle_tasks[@]}" \
-Pkwasm.wasi.testsuiteDir="$GITHUB_WORKSPACE/upstream/wasi-testsuite" \
2>&1 | tee "artifacts/wasi-preview1-${{ matrix.id }}.log"
- name: Write WASI conformance summary
if: always()
shell: bash
run: |
mkdir -p artifacts
{
echo "## Official WASI Preview 1 full corpus — ${{ matrix.name }}"
echo
echo "- Result: **${{ steps.conformance.outcome }}**"
echo "- wasi-testsuite: \`$WASI_TESTSUITE_COMMIT\`"
echo "- Scope: all 72 pinned C, Rust, and AssemblyScript \`wasm32-wasip1\` fixtures"
echo "- Exclusions: strict checked-in manifest; stale and malformed entries fail."
grep -Rho "kwasm official WASI Preview 1:[^<]*" \
wasm-tck/build/test-results 2>/dev/null | sort -u || true
} | tee "artifacts/wasi-preview1-${{ matrix.id }}-summary.md" >> "$GITHUB_STEP_SUMMARY"
- name: Upload WASI conformance evidence
if: always()
uses: actions/upload-artifact@v7
with:
name: pinned-wasi-preview1-${{ matrix.id }}
if-no-files-found: error
retention-days: 14
path: |
artifacts/
wasm-tck/build/test-results/
wasm-tck/build/reports/tests/