Skip to content

ci: add contract size regression testing (#312) - #322

Open
mikwansa wants to merge 1 commit into
Space-Nebula:mainfrom
mikwansa:ci/size-regression-312
Open

ci: add contract size regression testing (#312)#322
mikwansa wants to merge 1 commit into
Space-Nebula:mainfrom
mikwansa:ci/size-regression-312

Conversation

@mikwansa

Copy link
Copy Markdown

Closes #312

Summary

Adds a dedicated CI workflow that tracks WASM contract sizes, reports changes on PRs, and fails the build if any contract grows by more than 10%.

How it works

  1. Builds WASM in release mode, optimizes via soroban-cli
  2. Measures final sizes
  3. Compares against baseline committed to main
  4. Posts a detailed size table as a PR comment
  5. Fails CI if any contract exceeds 10% growth
  6. Auto-commits updated baseline on main branch pushes

Example PR comment

Contract Before After Change
stellar_nebula_nomad.optimized.wasm 48200 B 48500 B +0.6%
Total 48200 B 48500 B +0.6%

Also

  • Checks against the 64 KB Soroban limit
  • Works alongside the existing size-check in ci.yml

- Add dedicated size-regression.yml workflow that builds optimized WASM,
  measures sizes, and compares against a stored baseline
- Fail CI if any contract grows >10% from baseline
- PR comment with detailed size table showing before/after/change per contract
- Auto-commit updated baseline on main branch pushes
- Respects 64 KB Soroban contract size limit
@drips-wave

drips-wave Bot commented Jul 28, 2026

Copy link
Copy Markdown

@mikwansa 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

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 Contract Size Regression Tests

1 participant