feat(piecesAdded):validatePayerFunds #866
Workflow file for this run
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
| name: Solidity Contract Size Check | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| branches: ["main"] | |
| jobs: | |
| check_contract_size: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install Foundry | |
| uses: foundry-rs/foundry-toolchain@v1 | |
| with: | |
| version: v1.3.5 | |
| - name: Install Dependencies | |
| run: | | |
| cd service_contracts | |
| forge install | |
| - name: Install jq | |
| run: sudo apt-get install -y jq | |
| - name: Check contract size | |
| run: | | |
| cd service_contracts | |
| make contract-size-check | |
| - name: Build current commit sizes | |
| run: | | |
| cd service_contracts | |
| forge build --sizes --json > current_sizes.json | |
| - name: Build base branch sizes (PR only) | |
| if: github.event_name == 'pull_request' | |
| run: | | |
| git fetch origin main | |
| mkdir base_build | |
| git worktree add base_build origin/main | |
| cd base_build/service_contracts | |
| if forge build --offline --sizes --json > ../base_sizes.json 2>/dev/null; then | |
| echo "Offline build succeeded" | |
| else | |
| echo "Offline build failed, installing dependencies" | |
| forge install | |
| forge build --sizes --json > ../base_sizes.json | |
| fi | |
| cd ../.. | |
| git worktree remove --force base_build | |
| - name: Compare contract sizes | |
| run: | | |
| cd service_contracts | |
| if [ -f base_sizes.json ]; then | |
| ./tools/compare_contract_sizes.sh current_sizes.json base_sizes.json | |
| else | |
| echo "No base size data found - skipping delta comparison." | |
| fi |