-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (53 loc) · 2.21 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
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: 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/Moonsong-Labs/pathfinder.git ~/pathfinder
- name: Build pathfinder
run: |
source ~/.cargo/env
cd ~/pathfinder
cargo build --release --bin pathfinder
- name: Download and extract database file
run: |
mkdir ~/pathfinder/data
curl -L https://pub-1fac64c3c0334cda85b45bcc02635c32.r2.dev/sepolia-testnet_0.13.0_74494_pruned.sqlite.zst -o ~/pathfinder/data/sepolia-testnet.sqlite.zst
zstd -d ~/pathfinder/data/sepolia-testnet.sqlite.zst -o ~/pathfinder/data/sepolia-testnet.sqlite
- name: Attempt to run Pathfinder
run: RUST_LOG=info PATHFINDER_ETHEREUM_API_URL="" ~/pathfinder/target/release/pathfinder --data-directory ~/pathfinder/data --http-rpc 0.0.0.0:9545 --storage.state-tries archive