Skip to content

Commit

Permalink
Try run pathfinder
Browse files Browse the repository at this point in the history
  • Loading branch information
whichqua committed Aug 22, 2024
1 parent 36785d3 commit ed8dee5
Showing 1 changed file with 73 additions and 0 deletions.
73 changes: 73 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
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: Check if Cargo already installed
id: cargo-check
run: |
if [ -f "$HOME/.cargo/env" ]; then
echo "Cargo is already installed"
echo "cargo_installed=true" >> $GITHUB_ENV
else
echo "cargo_installed=false" >> $GITHUB_ENV
fi
- name: Install Cargo if needed
if: env.cargo_installed == 'false'
run: |
curl https://sh.rustup.rs -sSf -o /tmp/rustup.sh
chmod +x /tmp/rustup.sh
/tmp/rustup.sh -y -q
- name: Get repo
run: git clone https://github.com/eqlabs/pathfinder.git ~/pathfinder

- name: Get latest version
run: |
cd ~/pathfinder
git fetch
git checkout $(git tag --list | sort | tail -n1)
- name: Clear virtual env
run: |
rm -rf ~/pathfinder/py/.venv
- name: Initialize virtual env
run: |
cd ~/pathfinder/py
python3 -m venv .venv
- name: Update pip and install dependencies
run: |
cd ~/pathfinder/py
source .venv/bin/activate
pip install --upgrade pip
pip install -r requirements-dev.txt
- name: Build pathfinder
run: |
source ~/.cargo/env
cd ~/pathfinder
cargo build --release --bin pathfinder
- name: Download and extract database file
run: |
curl -L https://pub-1fac64c3c0334cda85b45bcc02635c32.r2.dev/sepolia-testnet_0.13.0_74494_pruned.sqlite.zst -o ~/pathfinder/sepolia-testnet.sqlite.zst
zstd -d ~/pathfinder/sepolia-testnet.sqlite.zst -o ~/pathfinder/sepolia-testnet.sqlite

0 comments on commit ed8dee5

Please sign in to comment.