Skip to content

Testing: Allow proving of blocks in CI #1

Testing: Allow proving of blocks in CI

Testing: Allow proving of blocks in CI #1

Workflow file for this run

name: Prove Blocks
on:
push:
branches:
- main
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install required packages
run: |
sudo apt-get update
sudo apt-get install -y curl git python3 python3-venv python3-dev build-essential libgmp-dev pkg-config libssl-dev zstd
- name: Cache Db
id: cache-db
uses: actions/cache@v3
with:
path: |
$HOME/pathfinder-data/testnet-sepolia.sqlite
- name: Download and extract database file
if: ${{ steps.cache-db.outputs.cache-hit != 'true' }}
run: |
mkdir -p $HOME/pathfinder-data
curl -L https://pub-1fac64c3c0334cda85b45bcc02635c32.r2.dev/sepolia-testnet_0.13.0_74494_archive.sqlite.zst -o sepolia-testnet.sqlite.zst
zstd -d sepolia-testnet.sqlite.zst -o $HOME/pathfinder-data/testnet-sepolia.sqlite
- name: Pull Pathfinder Docker image
run: |
docker pull odesenfans/pathfinder:latest
- name: Run Pathfinder container in the background
run: |
docker run \
--name pathfinder \
--detach \
-p 127.0.0.1:9545:9545 \
--user "$(id -u):$(id -g)" \
-e RUST_LOG=info \
-e PATHFINDER_ETHEREUM_API_URL=${{ secrets.PATHFINDER_ETHEREUM_API_URL }} \
-v $HOME/pathfinder-data:/usr/share/pathfinder/data \
odesenfans/pathfinder:latest \
--storage.state-tries=archive
- name: Wait for Pathfinder to be ready
run: |
until curl -s http://127.0.0.1:9545; do
echo "Waiting for Pathfinder to start..."
docker logs pathfinder
sleep 5
done
echo "Pathfinder is up!"
docker logs pathfinder
- name: "Install Rust"
uses: "actions-rs/toolchain@v1"
with:
toolchain: "stable"
- name: "Cache cargo"
id: cache-cargo
uses: "actions/cache@v4"
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
save-always: true
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- name: Create and activate Python virtual environment
run: |
python3 -m venv venv
source venv/bin/activate
- name: Setup the tests
run: |
source venv/bin/activate
pip install cairo-lang==0.13.1 "sympy<1.13.0"
bash scripts/setup-tests.sh
- name: Prove Blocks
run: bash scripts/prove-blocks.sh -p http://127.0.0.1:9545 -b 33911,33922,33928