@@ -23,75 +23,48 @@ jobs:
2323 with :
2424 tool-cache : false
2525 large-packages : false
26+
2627 - name : Checkout sources
2728 uses : actions/checkout@v4
29+
2830 - name : Setup Rust Environment
2931 uses : ./.github/actions/setup-rust
3032
31- - name : Install solc
32- uses : pontem-network/get-solc@master
33- with :
34- version : v0.8.29
35- token : ${{ secrets.GITHUB_TOKEN || '' }}
36-
3733 - name : Install ethrex
3834 run : |
39- cd ..
40- git clone https://github.com/lambdaclass/ethrex.git
41- cd ethrex
42- git checkout 187e8c27f9b9a22948cd82b0b3f79866c16ac489
35+ curl -L https://github.com/lambdaclass/ethrex/releases/download/v0.0.4-alpha/ethrex-linux_x86_64 -o /usr/local/bin/ethrex
36+ chmod +x /usr/local/bin/ethrex
37+ ethrex --version
4338 echo "ethrex installed successfully"
4439
45- # also creates empty verification keys (as workflow runs with exec backend)
46- - name : Build prover
40+ - name : Run ethrex l2 --dev
4741 run : |
48- cd ../ethrex/crates/l2
49- make build-prover
50- mkdir -p prover/zkvm/interface/sp1/out && touch prover/zkvm/interface/sp1/out/riscv32im-succinct-zkvm-vk
51-
52- - name : Build L1 docker image
53- uses : docker/build-push-action@v6
54- with :
55- context : ../ethrex/
56- file : ../ethrex/crates/blockchain/dev/Dockerfile
57- tags : ethrex_dev:latest
58- push : false
42+ ethrex l2 --dev &
5943
60- - name : Start L1 & Deploy contracts
44+ - name : Wait for ethrex l2
6145 run : |
62- cd ../ethrex/crates/l2
63- touch .env
64- CI_ETHREX_WORKDIR=/usr/local/bin \
65- ETHREX_DEPLOYER_DEPLOY_RICH=true \
66- ETHREX_DEPLOYER_PICO_CONTRACT_ADDRESS=0x00000000000000000000000000000000000000aa \
67- ETHREX_DEPLOYER_SP1_CONTRACT_ADDRESS=0x00000000000000000000000000000000000000aa \
68- ETHREX_DEPLOYER_RISC0_CONTRACT_ADDRESS=0x00000000000000000000000000000000000000aa \
69- ETHREX_L2_VALIDIUM=false \
70- docker compose -f docker-compose-l2.yaml up contract_deployer
71-
72- - name : Start Sequencer
46+ for i in {1..20}; do
47+ if nc -z localhost 3900; then
48+ echo "ProofCoordinator ready!"
49+ exit 0
50+ fi
51+ sleep 5
52+ done
53+ echo "ProofCoordinator not ready in time"
54+ exit 1
55+
56+ - name : Start Prover
7357 run : |
74- cd ../ethrex/crates/l2
75- CI_ETHREX_WORKDIR=/usr/local/bin \
76- ETHREX_L2_VALIDIUM=false \
77- ETHREX_WATCHER_BLOCK_DELAY=0 \
78- docker compose -f docker-compose-l2.yaml up --detach ethrex_l2
58+ ethrex l2 prover --proof-coordinator http://localhost:3900 &
7959
80- - name : Run test
60+ - name : Run tests
8161 run : |
82- sudo chmod -R a+rw ../ethrex/crates/l2
83- cd ../ethrex/crates/l2
84- RUST_LOG=info,ethrex_prover_lib=debug make init-prover &
85- docker logs --follow ethrex_l2 &
8662 cd /home/runner/work/rex/rex/sdk
8763 PROPOSER_COINBASE_ADDRESS=0x0007a881CD95B1484fca47615B64803dad620C8d cargo test --package rex-sdk --test tests -- --nocapture --test-threads=1
88- killall ethrex_prover -s SIGINT
89-
9064
9165 cli-integration-test :
9266 name : Integration Test - CLI
9367 runs-on : ubuntu-latest
94-
9568 steps :
9669 - name : Free Disk Space (Ubuntu)
9770@@ -103,68 +76,41 @@ jobs:
10376 - name : Setup Rust Environment
10477 uses : ./.github/actions/setup-rust
10578
106- - name : Install solc
107- uses : pontem-network/get-solc@master
108- with :
109- version : v0.8.29
110- token : ${{ secrets.GITHUB_TOKEN || '' }}
111-
11279 - name : Install ethrex
11380 run : |
114- cd ..
115- git clone https://github.com/lambdaclass/ethrex.git
116- cd ethrex
117- git checkout 187e8c27f9b9a22948cd82b0b3f79866c16ac489
81+ curl -L https://github.com/lambdaclass/ethrex/releases/download/v0.0.4-alpha/ethrex-linux_x86_64 -o /usr/local/bin/ethrex
82+ chmod +x /usr/local/bin/ethrex
83+ ethrex --version
11884 echo "ethrex installed successfully"
11985
120- # also creates empty verification keys (as workflow runs with exec backend)
121- - name : Build prover
86+ - name : Run ethrex l2 --dev
12287 run : |
123- cd ../ethrex/crates/l2
124- make build-prover
125- mkdir -p prover/zkvm/interface/sp1/out && touch prover/zkvm/interface/sp1/out/riscv32im-succinct-zkvm-vk
126-
127- - name : Build L1 docker image
128- uses : docker/build-push-action@v6
129- with :
130- context : ../ethrex/
131- file : ../ethrex/crates/blockchain/dev/Dockerfile
132- tags : ethrex_dev:latest
133- push : false
88+ ethrex l2 --dev &
13489
135- - name : Start L1 & Deploy contracts
90+ - name : Wait for ethrex l2
13691 run : |
137- cd ../ethrex/crates/l2
138- touch .env
139- CI_ETHREX_WORKDIR=/usr/local/bin \
140- ETHREX_DEPLOYER_DEPLOY_RICH=true \
141- ETHREX_DEPLOYER_PICO_CONTRACT_ADDRESS=0x00000000000000000000000000000000000000aa \
142- ETHREX_DEPLOYER_SP1_CONTRACT_ADDRESS=0x00000000000000000000000000000000000000aa \
143- ETHREX_DEPLOYER_RISC0_CONTRACT_ADDRESS=0x00000000000000000000000000000000000000aa \
144- ETHREX_L2_VALIDIUM=false \
145- docker compose -f docker-compose-l2.yaml up contract_deployer
146-
147- - name : Start Sequencer
92+ for i in {1..20}; do
93+ if nc -z localhost 3900; then
94+ echo "Service ready!"
95+ exit 0
96+ fi
97+ sleep 5
98+ done
99+ echo "Service not ready in time"
100+ exit 1
101+
102+ - name : Start Prover
148103 run : |
149- cd ../ethrex/crates/l2
150- CI_ETHREX_WORKDIR=/usr/local/bin \
151- ETHREX_L2_VALIDIUM=false \
152- ETHREX_WATCHER_BLOCK_DELAY=0 \
153- docker compose -f docker-compose-l2.yaml up --detach ethrex_l2
104+ ethrex l2 prover --proof-coordinator http://localhost:3900 &
154105
155- - name : Run test
106+ - name : Run tests
156107 run : |
157- sudo chmod -R a+rw ../ethrex/crates/l2
158- cd ../ethrex/crates/l2
159- RUST_LOG=info,ethrex_prover_lib=debug make init-prover &
160- docker logs --follow ethrex_l2 &
161108 cd /home/runner/work/rex/rex
162109 make cli
163110 cd cli
164111 PROPOSER_COINBASE_ADDRESS=0x0007a881CD95B1484fca47615B64803dad620C8d cargo test --package rex --test tests -- --nocapture --test-threads=1
165- killall ethrex_prover -s SIGINT
166112
167- # The purpose of this job is to add it as a required check in GitHub so that we don't have to add every individual job as a required check
113+ # The purpose of this job is to add it as a required check in GitHub so that we don't have to add every individual job as a required check
168114 all-tests :
169115 # "Integration Test" is a required check, don't change the name
170116 name : Integration Test
0 commit comments