Skip to content

ci: enforce WASM binary size budget in CI#436

Merged
PrincessnJoy merged 2 commits into
PrincessnJoy:mainfrom
Julianemeka:ci/wasm-size-budget-315
Jun 27, 2026
Merged

ci: enforce WASM binary size budget in CI#436
PrincessnJoy merged 2 commits into
PrincessnJoy:mainfrom
Julianemeka:ci/wasm-size-budget-315

Conversation

@Julianemeka

Copy link
Copy Markdown
Contributor

Summary

Adds a size-budget enforcement step to the existing build job in CI so WASM regressions are caught automatically.

Changes

.github/workflows/ci.yml

  • New Enforce WASM size budget step after the existing size-print step
  • Budget: 100 KB (102 400 bytes) per contract
  • Iterates over cosmosvote_*.wasm artifacts; fails the job if any exceeds the limit
  • Prints OK/FAIL per binary with byte counts for easy debugging

docs/wasm-size-budget.md (new)

  • Documents the budget table
  • Explains the rationale (Soroban upload limit, fees, regression detection)
  • Provides wasm-opt and Cargo tips for reducing binary size

Budget rationale

Soroban has a hard upload ceiling. 100 KB sits well below it while leaving room for contract growth. The budget can be raised in a PR with written justification.

Closes #315

Julianemeka and others added 2 commits June 26, 2026 07:00
Closes PrincessnJoy#315

- Add 'Enforce WASM size budget' step to the build job
- Budget: 100 KB (102400 bytes) per contract
- Fail CI if any cosmosvote_*.wasm exceeds the limit
- Add docs/wasm-size-budget.md documenting rationale and how to reduce size
@drips-wave

drips-wave Bot commented Jun 27, 2026

Copy link
Copy Markdown

@Julianemeka Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@PrincessnJoy PrincessnJoy merged commit efa0acb into PrincessnJoy:main Jun 27, 2026
0 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add WASM binary size budget enforcement in CI

2 participants