Skip to content

feat(ci,sdk): add rex daily report #176

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Jul 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/scripts/publish_report.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
curl -X POST $1 \
-H 'Content-Type: application/json; charset=utf-8' \
--data @- <<EOF
$(jq -n --arg text "$2" '{
"blocks": [
{
"type": "header",
"text": {
"type": "plain_text",
"text": "Rex report"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": $text
}
}
]
}')
EOF
164 changes: 164 additions & 0 deletions .github/workflows/daily_reports.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
permissions:
contents: read

name: Daily Reports
on:
schedule:
# Every day at UTC 03:00
- cron: "0 3 * * 1,2,3,4,5"
workflow_dispatch:

jobs:
sdk-integration-test:
name: Integration Test - SDK
runs-on: ubuntu-latest
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/[email protected]
with:
tool-cache: false
large-packages: false
- name: Checkout sources
uses: actions/checkout@v4
- name: Setup Rust Environment
uses: ./.github/actions/setup-rust
- name: Install solc
uses: pontem-network/get-solc@master
with:
version: v0.8.29
token: ${{ secrets.GITHUB_TOKEN || '' }}
- name: Install ethrex
run: |
cd ..
git clone https://github.com/lambdaclass/ethrex.git
echo "ethrex installed successfully"
# also creates empty verification keys (as workflow runs with exec backend)
- name: Build prover
run: |
cd ../ethrex/crates/l2
make build-prover
mkdir -p prover/zkvm/interface/sp1/out && touch prover/zkvm/interface/sp1/out/riscv32im-succinct-zkvm-vk
- name: Build L1 docker image
uses: docker/build-push-action@v6
with:
context: ../ethrex/
file: ../ethrex/crates/blockchain/dev/Dockerfile
tags: ethrex_dev:latest
push: false
- name: Start L1 & Deploy contracts
run: |
cd ../ethrex/crates/l2
touch .env
CI_ETHREX_WORKDIR=/usr/local/bin \
ETHREX_DEPLOYER_DEPLOY_RICH=true \
ETHREX_DEPLOYER_PICO_CONTRACT_ADDRESS=0x00000000000000000000000000000000000000aa \
ETHREX_DEPLOYER_SP1_CONTRACT_ADDRESS=0x00000000000000000000000000000000000000aa \
ETHREX_DEPLOYER_RISC0_CONTRACT_ADDRESS=0x00000000000000000000000000000000000000aa \
ETHREX_L2_VALIDIUM=false \
docker compose -f docker-compose-l2.yaml up contract_deployer
- name: Start Sequencer
run: |
cd ../ethrex/crates/l2
CI_ETHREX_WORKDIR=/usr/local/bin \
ETHREX_L2_VALIDIUM=false \
ETHREX_WATCHER_BLOCK_DELAY=0 \
docker compose -f docker-compose-l2.yaml up --detach ethrex_l2
- name: Run test
run: |
sudo chmod -R a+rw ../ethrex/crates/l2
cd ../ethrex/crates/l2
RUST_LOG=info,ethrex_prover_lib=debug make init-prover &
docker logs --follow ethrex_l2 &
cd /home/runner/work/rex/rex/sdk
PROPOSER_COINBASE_ADDRESS=0x0007a881CD95B1484fca47615B64803dad620C8d cargo test --package rex-sdk --test tests -- --nocapture --test-threads=1
killall ethrex_prover -s SIGINT

cli-integration-test:
name: Integration Test - CLI
runs-on: ubuntu-latest

steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/[email protected]
with:
tool-cache: false
large-packages: false
- name: Checkout sources
uses: actions/checkout@v4
- name: Setup Rust Environment
uses: ./.github/actions/setup-rust

- name: Install solc
uses: pontem-network/get-solc@master
with:
version: v0.8.29
token: ${{ secrets.GITHUB_TOKEN || '' }}

- name: Install ethrex
run: |
cd ..
git clone https://github.com/lambdaclass/ethrex.git
echo "ethrex installed successfully"
# also creates empty verification keys (as workflow runs with exec backend)
- name: Build prover
run: |
cd ../ethrex/crates/l2
make build-prover
mkdir -p prover/zkvm/interface/sp1/out && touch prover/zkvm/interface/sp1/out/riscv32im-succinct-zkvm-vk
- name: Build L1 docker image
uses: docker/build-push-action@v6
with:
context: ../ethrex/
file: ../ethrex/crates/blockchain/dev/Dockerfile
tags: ethrex_dev:latest
push: false

- name: Start L1 & Deploy contracts
run: |
cd ../ethrex/crates/l2
touch .env
CI_ETHREX_WORKDIR=/usr/local/bin \
ETHREX_DEPLOYER_DEPLOY_RICH=true \
ETHREX_DEPLOYER_PICO_CONTRACT_ADDRESS=0x00000000000000000000000000000000000000aa \
ETHREX_DEPLOYER_SP1_CONTRACT_ADDRESS=0x00000000000000000000000000000000000000aa \
ETHREX_DEPLOYER_RISC0_CONTRACT_ADDRESS=0x00000000000000000000000000000000000000aa \
ETHREX_L2_VALIDIUM=false \
docker compose -f docker-compose-l2.yaml up contract_deployer
- name: Start Sequencer
run: |
cd ../ethrex/crates/l2
CI_ETHREX_WORKDIR=/usr/local/bin \
ETHREX_L2_VALIDIUM=false \
ETHREX_WATCHER_BLOCK_DELAY=0 \
docker compose -f docker-compose-l2.yaml up --detach ethrex_l2
- name: Run test
run: |
sudo chmod -R a+rw ../ethrex/crates/l2
cd ../ethrex/crates/l2
RUST_LOG=info,ethrex_prover_lib=debug make init-prover &
docker logs --follow ethrex_l2 &
cd /home/runner/work/rex/rex
make cli
cd cli
PROPOSER_COINBASE_ADDRESS=0x0007a881CD95B1484fca47615B64803dad620C8d cargo test --package rex --test tests -- --nocapture --test-threads=1
killall ethrex_prover -s SIGINT

post-daily-report:
name: Post report to slack
runs-on: ubuntu-latest
needs: [sdk-integration-test, cli-integration-test]
if: ${{ always() && needs.sdk-integration-test.result != 'skipped' && needs.cli-integration-test.result != 'skipped' }}
steps:
- name: Checkout sources
uses: actions/checkout@v4

- name: Check if any job failed
run: |
if [ "${{ needs.sdk-integration-test.result }}" != "success" ]; then
sh .github/scripts/publish_report.sh ${{ secrets.TEST_CHANNEL_SLACK }} "Rex SDK is out of sync with ethrex."
fi
if [ "${{ needs.cli-integration-test.result }}" != "success" ]; then
sh .github/scripts/publish_report.sh ${{ secrets.TEST_CHANNEL_SLACK }} "Rex CLI is out of sync with ethrex."
fi
echo "Sending Results" >> $GITHUB_STEP_SUMMARY

Loading