forked from succinctlabs/op-succinct
-
Notifications
You must be signed in to change notification settings - Fork 1
93 lines (80 loc) · 2.97 KB
/
Copy pathcycle-count-diff.yml
File metadata and controls
93 lines (80 loc) · 2.97 KB
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
name: Cycle Count Diff
on:
pull_request:
paths:
- 'elf/range-elf-embedded'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ !startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/main' }}
jobs:
cycle-count-diff:
runs-on:
- runs-on
- cpu=32
- ram=128
- family=m7a+m7i-flex
- image=ubuntu22-full-x64
- run-id=${{ github.run_id }}
- disk=large
- spot=false
steps:
- name: Checkout Repository (for local actions)
uses: actions/checkout@v4
- name: Setup CI
uses: ./.github/actions/setup
with:
submodules: recursive
- name: Install SP1 toolchain
run: |
curl -L https://sp1.succinct.xyz | bash
~/.sp1/bin/sp1up -v 6.4.0
~/.sp1/bin/cargo-prove prove --version
source ~/.bashrc
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly-d592b3e0f142d694c3be539702704a4a73238773
- name: Checkout PR Branch
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
path: new_code
submodules: recursive
- name: Checkout Base Branch
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.base.ref }}
path: old_code
submodules: recursive
- name: Run Test On New Branch
run: |
RUST_LOG=info NEW_BRANCH=true cargo test test_cycle_count_diff --release -- --exact --nocapture
working-directory: ./new_code
env:
L2_NODE_RPC: ${{ secrets.L2_NODE_RPC }}
L1_RPC: ${{ secrets.L1_RPC }}
L1_BEACON_RPC: ${{ secrets.L1_BEACON_RPC }}
L2_RPC: ${{ secrets.L2_RPC }}
- name: Copy Stats File For Old Branch
run: |
STATS_FILE=$(find ${{ github.workspace }}/new_code -name "new_cycle_stats.json" -type f | head -1)
cp "$STATS_FILE" ${{ github.workspace }}/old_code/scripts/prove/new_cycle_stats.json
- name: Run Test On Old Branch
run: |
RUST_LOG=info NEW_BRANCH=false cargo test test_cycle_count_diff --release -- --exact --nocapture
working-directory: ./old_code
env:
L2_NODE_RPC: ${{ secrets.L2_NODE_RPC }}
L1_RPC: ${{ secrets.L1_RPC }}
L1_BEACON_RPC: ${{ secrets.L1_BEACON_RPC }}
L2_RPC: ${{ secrets.L2_RPC }}
- name: Compare Results And Post To Github
run: |
RUST_LOG=info cargo test --test cycle_count_diff test_post_to_github -- --exact --nocapture
working-directory: ./old_code
env:
REPO_OWNER: ${{ github.repository_owner }}
REPO_NAME: ${{ github.event.repository.name }}
PR_NUMBER: ${{ github.event.pull_request.number }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
POST_TO_GITHUB: ${{ github.event_name == 'pull_request' }}