-
Notifications
You must be signed in to change notification settings - Fork 54
76 lines (69 loc) · 2.29 KB
/
cost-estimator-manual.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
name: Cost Estimator (1000 blocks)
on:
workflow_dispatch:
inputs:
start_block:
description: 'Start block (optional - will use latest finalized - 1000 if not provided)'
required: false
end_block:
description: 'End block (optional - will use latest finalized if not provided)'
required: false
batch_size:
description: 'Batch size for processing blocks'
required: false
default: '30'
default_range:
description: 'The number of blocks to use for the default range'
required: false
default: '1000'
schedule:
- cron: '0 0 * * *' # Run the workflow every day at midnight UTC.
pull_request:
branches: [ main ]
jobs:
cost-estimate:
runs-on:
- runs-on
- cpu=16
- ram=64
- family=m7a+m7i-flex
- image=ubuntu22-full-x64
- run-id=${{ github.run_id }}
steps:
- uses: actions/checkout@v4
- name: rust-cache
uses: actions/cache@v3
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
restore-keys: rust-1.81.0-
key: rust-1.81.0-${{ hashFiles('**/Cargo.toml') }}
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Run cost estimator
run: |
ARGS="--batch-size ${{ github.event.inputs.batch_size }} --default-range ${{ github.event.inputs.default_range }}"
if [ ! -z "${{ github.event.inputs.start_block }}" ]; then
ARGS="$ARGS --start ${{ github.event.inputs.start_block }}"
fi
if [ ! -z "${{ github.event.inputs.end_block }}" ]; then
ARGS="$ARGS --end ${{ github.event.inputs.end_block }}"
fi
RUST_LOG=info cargo run --bin cost-estimator --release -- $ARGS
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: Upload execution reports
uses: actions/upload-artifact@v4
with:
name: execution-reports
path: execution-reports/