perf: L2 gas optimization — 54.8% weighted gas reduction #2
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: Devnet Smoke | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| devnet-smoke: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| env: | |
| FOUNDRY_VERSION: nightly-2024-05-20 | |
| RUST_TOOLCHAIN: 1.85.0 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install Foundry | |
| uses: foundry-rs/foundry-toolchain@v1 | |
| with: | |
| version: ${{ env.FOUNDRY_VERSION }} | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: ${{ env.RUST_TOOLCHAIN }} | |
| - name: Install dependencies | |
| run: sudo apt-get update && sudo apt-get install -y jq pkg-config libssl-dev | |
| - name: Start Anvil | |
| run: ./scripts/start-local-anvil.sh > /tmp/anvil.log 2>&1 & | |
| - name: Wait for RPC | |
| timeout-minutes: 1 | |
| run: | | |
| for i in {1..30}; do | |
| if curl -sf http://localhost:8545 -X POST \ | |
| -H "Content-Type: application/json" \ | |
| -d '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1}' >/dev/null; then | |
| exit 0 | |
| fi | |
| sleep 1 | |
| done | |
| echo "Anvil failed to start" | |
| tail -n 200 /tmp/anvil.log || true | |
| exit 1 | |
| - name: Validate config | |
| timeout-minutes: 2 | |
| run: ./scripts/dev.sh validate | |
| - name: Contract tests | |
| timeout-minutes: 10 | |
| run: ./scripts/dev.sh test | |
| - name: Smoke test | |
| timeout-minutes: 5 | |
| run: ./scripts/dev.sh smoke | |
| - name: Anchor smoke test | |
| timeout-minutes: 5 | |
| run: ./scripts/dev.sh anchor-smoke | |
| - name: Upload logs on failure | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: devnet-logs | |
| path: /tmp/anvil.log | |
| retention-days: 7 | |
| - name: Cleanup | |
| if: always() | |
| run: | | |
| pkill -f anvil 2>/dev/null || true | |
| pkill -f "start-local-anvil" 2>/dev/null || true |