-
Notifications
You must be signed in to change notification settings - Fork 5
96 lines (83 loc) · 2.28 KB
/
pr.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name: PR
on:
push:
branches: [main]
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
example:
name: Uniswap example
runs-on:
[
runs-on,
cpu=64,
ram=256,
family=m7i+m7a,
hdd=80,
image=ubuntu22-full-x64,
spot=false,
"run-id=${{ github.run_id }}",
]
env:
CARGO_NET_GIT_FETCH_WITH_CLI: "true"
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: "Install sp1up"
run: |
curl -L https://sp1.succinct.xyz | bash
echo "$HOME/.sp1/bin" >> $GITHUB_PATH
- name: "Install SP1 toolchain"
run: |
sp1up
- name: "Set up RPC env"
run: |
echo "ETH_RPC_URL=${{secrets.ETH_RPC_URL}}" >> $GITHUB_ENV
- name: Run uniswap script
uses: actions-rs/cargo@v1
with:
command: run
args:
--release --bin uniswap --ignore-rust-version
env:
RUSTFLAGS: -Copt-level=3 -Coverflow-checks=y -Cdebuginfo=0 -C target-cpu=native
RUST_BACKTRACE: full
RUST_LOG: info
test-e2e:
name: E2E tests
runs-on: ["runs-on", "runner=32cpu-linux-x64", "run-id=${{ github.run_id }}"]
env:
CARGO_NET_GIT_FETCH_WITH_CLI: "true"
steps:
- name: "Checkout sources"
uses: actions/checkout@v4
- name: "Set up RPC env"
run: |
echo "ETH_RPC_URL=${{secrets.ETH_RPC_URL}}" >> $GITHUB_ENV
- name: "Run integration test"
run: |
SP1_DEV=1 RUST_LOG=info cargo test -p sp1-cc-host-executor --release -- --nocapture
test-uniswap-forge:
name: Test uniswap forge
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Run Forge build
run: |
cd examples/uniswap/contracts
forge --version
forge build --sizes
id: build
- name: Run Forge tests
run: |
cd examples/uniswap/contracts
forge test -vvv
id: test