Skip to content

Conversation

@ascjones
Copy link
Collaborator

@ascjones ascjones commented Sep 15, 2023

Previously the ink-waterfall step reported changes in contract sizes for a PR compared to master. This was useful for preventing regressions and also for PRs which are designed to improve the contract sizes.

This PR restores this check, this time integrated as part of the ink CI itself.

I have split the check into separate script files that can be run locally (apart from contract_sizes_submit.sh) for easy testing and to make it easy to migrate to GHA later.

@ascjones ascjones changed the title **WIP** Restore contract size checks WIP Restore contract size checks Sep 15, 2023
@codecov-commenter
Copy link

codecov-commenter commented Sep 15, 2023

Codecov Report

Merging #1916 (233cf2d) into master (062c02d) will decrease coverage by 0.02%.
Report is 1 commits behind head on master.
The diff coverage is n/a.

❗ Current head 233cf2d differs from pull request most recent head fcfd909. Consider uploading reports for the commit fcfd909 to get more accurate results

@@            Coverage Diff             @@
##           master    #1916      +/-   ##
==========================================
- Coverage   52.93%   52.92%   -0.02%     
==========================================
  Files         219      219              
  Lines        6780     6780              
==========================================
- Hits         3589     3588       -1     
- Misses       3191     3192       +1     

see 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@use-ink use-ink deleted a comment from paritytech-cicd-pr Oct 16, 2023
@paritytech-cicd-pr
Copy link

paritytech-cicd-pr commented Oct 16, 2023

🦑 📈 ink! Example Contracts ‒ Changes Report 📉 🦑

⚠️ The ink! master is ahead of your branch, this might skew the comparison data below. ⚠️
These are the results when building the integration-tests/* contracts from this branch with cargo-contract 4.0.0-alpha-acc02b1 and comparing them to ink! master:

Contract Upstream Size (kB) PR Size (kB) Diff (kB) Diff (%) Change
basic-contract-caller 2.998 2.998 0 0
basic-contract-caller/other-contract 1.331 1.331 0 0
call-builder-return-value 8.734 8.734 0 0
call-runtime 1.77 1.77 0 0
conditional-compilation 1.204 1.204 0 0
contract-terminate 1.087 1.087 0 0
contract-transfer 1.446 1.446 0 0
custom-allocator 7.39 7.39 0 0
dns 7.313 7.313 0 0
e2e-call-runtime 1.057 1.057 0 0
e2e-runtime-only-backend 1.633 1.633 0 0
erc1155 14.113 14.107 -0.006 -0.042514 📉
erc20 6.572 6.572 0 0
erc721 9.547 9.547 0 0
events 4.816 4.816 0 0
flipper 1.387 1.387 0 0
incrementer 1.217 1.217 0 0
lang-err-integration-tests/call-builder-delegate 2.321 2.321 0 0
lang-err-integration-tests/call-builder 4.875 4.875 0 0
lang-err-integration-tests/constructors-return-value 1.772 1.772 0 0
lang-err-integration-tests/contract-ref 4.363 4.363 0 0
lang-err-integration-tests/integration-flipper 1.565 1.565 0 0
mapping-integration-tests 2.975 2.975 0 0
mother 9.499 9.499 0 0
multi-contract-caller 5.977 5.977 0 0
multi-contract-caller/accumulator 1.09 1.09 0 0
multi-contract-caller/adder 1.672 1.672 0 0
multi-contract-caller/subber 1.693 1.693 0 0
multisig 21.406 21.406 0 0
payment-channel 5.544 5.544 0 0
sr25519-verification 0.865 0.865 0 0
static-buffer 1.411 1.411 0 0
trait-dyn-cross-contract-calls 2.491 2.491 0 0
trait-dyn-cross-contract-calls/contracts/incrementer 1.3 1.3 0 0
trait-erc20 6.956 6.956 0 0
trait-flipper 1.204 1.204 0 0
trait-incrementer 1.365 1.365 0 0
upgradeable-contracts/delegator 2.902 2.902 0 0
upgradeable-contracts/delegator/delegatee 1.368 1.368 0 0
upgradeable-contracts/set-code-hash 1.46 1.46 0 0
upgradeable-contracts/set-code-hash/updated-incrementer 1.439 1.439 0 0
wildcard-selector 2.619 2.619 0 0

Link to the run | Last update: Tue Oct 17 11:53:02 CEST 2023

@ascjones ascjones marked this pull request as ready for review October 17, 2023 08:16
@ascjones ascjones requested review from a team, SkymanOne and cmichi as code owners October 17, 2023 08:16
@@ -0,0 +1,188 @@
#!/usr/bin/env bash

# Script copied from: https://josh.fail/2022/pure-bash-markdown-table-generator/
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note this whole script to generate a markdown table copied from https://josh.fail/2022/pure-bash-markdown-table-generator/

Copy link
Collaborator

@cmichi cmichi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🌈

@ascjones ascjones merged commit 7d2350d into master Oct 17, 2023
@ascjones ascjones deleted the aj/contract-sizes-ci branch October 17, 2023 11:22
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.

5 participants