fix: database name #17
This file contains 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: Starknet Installer | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- 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: Install latest Protoc version | |
run: | | |
PROTOC_VERSION=23.3 # Specify the version you need here | |
PROTOC_ZIP=protoc-$PROTOC_VERSION-linux-x86_64.zip | |
curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v$PROTOC_VERSION/$PROTOC_ZIP | |
sudo unzip -o $PROTOC_ZIP -d /usr/local bin/protoc | |
sudo unzip -o $PROTOC_ZIP -d /usr/local 'include/*' | |
rm -f $PROTOC_ZIP | |
- name: Download and extract database file | |
run: | | |
mkdir -p $HOME/pathfinder-data | |
curl -L https://pub-1fac64c3c0334cda85b45bcc02635c32.r2.dev/sepolia-testnet_0.13.0_74494_pruned.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..." | |
sleep 5 | |
done | |
echo "Pathfinder is up!" | |
- name: Install Rust | |
run: | | |
curl https://sh.rustup.rs -sSf | sh -s -- -y | |
source $HOME/.cargo/env | |
rustup update stable | |
- name: Clone Rust repository | |
run: | | |
git clone https://github.com/keep-starknet-strange/snos.git | |
cd snos | |
- name: Create and activate Python virtual environment | |
run: | | |
cd snos | |
python3 -m venv venv | |
source venv/bin/activate | |
- name: Setup the tests | |
run: | | |
cd snos | |
source venv/bin/activate | |
pip install cairo-lang==0.13.1 "sympy<1.13.0" | |
bash scripts/setup-tests.sh | |
- name: Run cargo command | |
run: | | |
docker logs pathfinder | |
cd snos/crates/bin/prove_block | |
cargo run -p prove_block -- --block-number 117 --rpc-provider http://127.0.0.1:9545 |