From 13490af0a42470a0af7dcf04de63b7543eb244b1 Mon Sep 17 00:00:00 2001 From: Arpit Temani Date: Mon, 18 Nov 2024 21:34:58 +0530 Subject: [PATCH] add ci --- .github/workflows/zeth-integration.yml | 58 ++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 .github/workflows/zeth-integration.yml diff --git a/.github/workflows/zeth-integration.yml b/.github/workflows/zeth-integration.yml new file mode 100644 index 000000000..2406bb9b6 --- /dev/null +++ b/.github/workflows/zeth-integration.yml @@ -0,0 +1,58 @@ +--- +# Zeth Integration + +name: Zeth Integration + +on: + push: + branches: [develop, main] + pull_request: + branches: + - "**" + workflow_dispatch: + branches: + - "**" + +env: + CARGO_TERM_COLOR: always + REGISTRY: ghcr.io + +jobs: + zeth_integration: + name: Zeth Integration + runs-on: zero-ci + timeout-minutes: 30 + steps: + # - uses: actions/checkout@v4 + # - uses: ./.github/actions/rust + + # It is much easier to use cast tool in scripts so install foundry + - name: Install Foundry + uses: foundry-rs/foundry-toolchain@v1 + + # TODO - @temaniarpit27 change branch here + - name: Clone Repositories + run: | + mkdir -p repos + git clone --depth 1 --branch "arpit/1" https://github.com/0xPolygonZero/zeth.git repos/zeth + git clone --depth 1 --branch "main" https://github.com/0xPolygonZero/zkevm.git repos/zkevm + + - name: Run zeth network + run: | + cd repos/zeth + touch polygon-zero.db + cargo run -- node --dev --dev.block-time 2s --http.api all + sleep 10 + + - name: Generate txn + run: | + cast send --async --legacy \ + --from "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266" \ + --private-key "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" \ + --rpc-url http://localhost:8545 --gas-limit 100000 --value 1 "0x852DA15b70a3e197d1D668a9a481B1F4c2168a5D" + + - name: Run prove blocks with zero tracer in test_only mode + run: | + cd repos/zkevm + OUTPUT_TO_TERMINAL=true ./scripts/prove_rpc.sh 1 1 http://localhost:8545 zeth 0 3000 100 test_only + echo "Proving blocks in test_only mode finished"