ci: add build-wasm job to verify WebAssembly compilation#16305
Merged
Conversation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds CI coverage for the project’s WebAssembly build target so CI will fail if make build-wasm stops compiling, and surfaces the produced .wasm size in the run summary.
Changes:
- Introduces a new
build-wasmCI job that runsmake build-wasmon Ubuntu. - Adds Go cache reporting and Go module download/verify steps consistent with other Go jobs.
- Appends the resulting
gh-aw.wasmsize toGITHUB_STEP_SUMMARY.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+654
to
+663
| if ls gh-aw.wasm 1>/dev/null 2>&1; then | ||
| SIZE=$(stat --format="%s" gh-aw.wasm) | ||
| SIZE_MB=$(awk "BEGIN {printf \"%.2f\", $SIZE/1048576}") | ||
| echo "✅ Build succeeded" >> $GITHUB_STEP_SUMMARY | ||
| echo "- **Binary:** gh-aw.wasm" >> $GITHUB_STEP_SUMMARY | ||
| echo "- **Size:** ${SIZE_MB} MB (${SIZE} bytes)" >> $GITHUB_STEP_SUMMARY | ||
| else | ||
| echo "❌ No .wasm binary found" >> $GITHUB_STEP_SUMMARY | ||
| ls -la *.wasm 2>/dev/null || echo "No wasm files in working directory" >> $GITHUB_STEP_SUMMARY | ||
| exit 1 |
There was a problem hiding this comment.
In the failure branch, ls -la *.wasm writes to the job logs, not to $GITHUB_STEP_SUMMARY, so the step summary won’t include the directory listing when a .wasm exists but gh-aw.wasm is missing. Consider redirecting the listing output into the step summary as well (and using a file test like [ -f gh-aw.wasm ] instead of ls for existence checks).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
build-wasmjob to the CI pipeline that verifies the WebAssembly compilation target (make build-wasm) succeeds.wasmbinary size toGITHUB_STEP_SUMMARYfor visibilityTest plan
build-wasmjob appears in the CI workflow runmake build-wasmcompletes successfully in CI🤖 Generated with Claude Code