-
Notifications
You must be signed in to change notification settings - Fork 1
81 lines (68 loc) · 1.97 KB
/
prove.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Build Program
on:
workflow_dispatch:
push:
branches: [main]
pull_request:
branches: [main]
env:
FOUNDRY_PROFILE: ci
jobs:
check:
strategy:
fail-fast: true
matrix:
rust-version: [stable]
os: [ubuntu-latest]
name: Build and Test
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Cache Rust Dependencies
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
target # Cache both cargo registry, git, and build artifacts
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} # Cache key based on Cargo.lock file
restore-keys: |
${{ runner.os }}-cargo- # Fallback cache key
- name: Install Rust Toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- name: Install SP1 Toolchain
run: |
curl -L https://sp1.succinct.xyz | bash # Downloads and installs SP1
~/.sp1/bin/sp1up # Update SP1 to ensure it's the latest version
~/.sp1/bin/cargo-prove prove --version # Confirm SP1 installation
- uses: taiki-e/install-action@nextest
- name: Run Tests with Nextest
env:
RPC_URL_ETHEREUM_SEPOLIA: ${{ secrets.RPC_URL }}
run: |
cd lib
cargo nextest run
cd ../
- name: Run Online Mode
env:
RPC_URL_ETHEREUM_SEPOLIA: ${{ secrets.RPC_URL }}
run: |
cd program
cargo run -r
cd ../
- name: Build SP1 Program
run: |
cd program
~/.sp1/bin/cargo-prove prove build
cd ../
# - name: Run Custom Script
# run: |
# cd script
# RUST_LOG=info cargo run -r -- --execute # Runs a custom script
# cd ../