7
7
env :
8
8
RUSTFLAGS : -D warnings
9
9
CARGO_TERM_COLOR : always
10
- GETH_BUILD : 1.10.26-e5eb32ac
11
10
12
11
concurrency :
13
12
group : ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
14
13
cancel-in-progress : true
15
14
16
15
name : ci
17
16
jobs :
18
- test :
19
- # Pin to `20.04` instead of `ubuntu-latest`, until ubuntu-latest migration is complete
20
- # See also <https://github.com/foundry-rs/foundry/issues/3827>
21
- runs-on : ubuntu-20.04
22
- steps :
23
- - name : Checkout sources
24
- uses : actions/checkout@v3
25
- - name : Install toolchain
26
- uses : dtolnay/rust-toolchain@stable
27
- with :
28
- components : llvm-tools-preview
29
- - uses : Swatinem/rust-cache@v2
30
- with :
31
- cache-on-failure : true
32
-
33
- - name : Install geth
34
- run : |
35
- mkdir -p "$HOME/bin"
36
- wget -q https://gethstore.blob.core.windows.net/builds/geth-linux-amd64-$GETH_BUILD.tar.gz
37
- tar -xvf geth-linux-amd64-$GETH_BUILD.tar.gz
38
- mv geth-linux-amd64-$GETH_BUILD/geth $HOME/bin/geth
39
- chmod u+x "$HOME/bin/geth"
40
- export PATH=$HOME/bin:$PATH
41
- echo $HOME/bin >> $GITHUB_PATH
42
- geth version
43
-
44
- - name : Install latest nextest release
45
- uses : taiki-e/install-action@nextest
46
- - name : Install cargo-llvm-cov
47
- uses : taiki-e/install-action@cargo-llvm-cov
48
-
49
- - name : Run tests
50
- run : cargo llvm-cov nextest --lcov --output-path lcov.info --locked --workspace --all-features
51
-
52
- - name : Upload coverage data to codecov
53
- uses : codecov/codecov-action@v3
54
- with :
55
- token : ${{ secrets.CODECOV_TOKEN }}
56
- files : lcov.info
57
- flags : unit-tests
58
-
59
- eth-blockchain :
60
- name : ethereum blockchain tests (stable)
61
- runs-on : ubuntu-latest
62
- env :
63
- RUST_LOG : info,sync=error
64
- steps :
65
- - name : Checkout sources
66
- uses : actions/checkout@v2
67
-
68
- - name : Checkout ethereum/tests
69
- uses : actions/checkout@v2
70
- with :
71
- repository : ethereum/tests
72
- path : ethtests
73
- submodules : recursive
74
-
75
- - name : Install toolchain
76
- uses : actions-rs/toolchain@v1
77
- with :
78
- toolchain : stable
79
- profile : minimal
80
- override : true
81
-
82
- - uses : Swatinem/rust-cache@v1
83
- with :
84
- cache-on-failure : true
85
-
86
- - name : Run Ethereum tests
87
- run : cargo run --release -- test-chain ethtests/BlockchainTests/GeneralStateTests/
88
-
89
- eth-sync :
90
- name : ethereum blockchain sync (${{ matrix.profile }}; 100k blocks)
91
- strategy :
92
- matrix :
93
- profile : [release, dev]
94
- runs-on : ubuntu-latest
95
- env :
96
- RUST_LOG : info,sync=error
97
- steps :
98
- - name : Checkout sources
99
- uses : actions/checkout@v2
100
-
101
- - name : Install toolchain
102
- uses : actions-rs/toolchain@v1
103
- with :
104
- toolchain : stable
105
- profile : minimal
106
-
107
- - uses : Swatinem/rust-cache@v1
108
- with :
109
- cache-on-failure : true
110
-
111
- - name : Run Sync (debug)
112
- run : cargo run --profile ${{ matrix.profile }} --bin reth -- node --debug.tip 0x91c90676cab257a59cd956d7cb0bceb9b1a71d79755c23c7277a0697ccfaf8c4 --debug.max-block 100000
113
-
114
- fuzz :
115
- # Skip the Fuzzing Jobs until we make them run fast and reliably. Currently they will
116
- # always recompile the codebase for each test and that takes way too long.
117
- if : false
118
-
119
- # Pin to `20.04` instead of `ubuntu-latest`, until ubuntu-latest migration is complete
120
- # See also <https://github.com/foundry-rs/foundry/issues/3827>
121
- runs-on : ubuntu-20.04
122
- strategy :
123
- matrix :
124
- target :
125
- - reth-primitives
126
- - reth-db
127
- - reth-eth-wire
128
- - reth-codecs
129
- steps :
130
- - name : Checkout sources
131
- uses : actions/checkout@v3
132
- - name : Install toolchain
133
- uses : dtolnay/rust-toolchain@stable
134
- with :
135
- components : llvm-tools-preview
136
- - uses : Swatinem/rust-cache@v2
137
- with :
138
- cache-on-failure : true
139
-
140
- - name : Install fuzzer
141
- uses : actions-rs/cargo@v1
142
- with :
143
- command : install
144
- args : cargo-test-fuzz afl
145
- - name : Force install cargo-afl
146
- run : |
147
- cargo install --force afl
148
- cargo afl --version
149
- - name : Install cargo-llvm-cov
150
- uses : taiki-e/install-action@cargo-llvm-cov
151
-
152
- - name : Run fuzz tests
153
- run : |
154
- ./.github/scripts/fuzz.sh ${{ matrix.target }}
155
- env :
156
- AFL_I_DONT_CARE_ABOUT_MISSING_CRASHES : 1
157
- - name : Upload coverage data to codecov
158
- uses : codecov/codecov-action@v3
159
- with :
160
- token : ${{ secrets.CODECOV_TOKEN }}
161
- files : lcov.info
162
- flags : fuzz-tests
163
-
164
17
lint :
18
+ name : code lint
165
19
# Pin to `20.04` instead of `ubuntu-latest`, until ubuntu-latest migration is complete
166
20
# See also <https://github.com/foundry-rs/foundry/issues/3827>
167
21
runs-on : ubuntu-20.04
@@ -188,17 +42,8 @@ jobs:
188
42
args : --all --all-features
189
43
token : ${{ secrets.GITHUB_TOKEN }}
190
44
191
- doc-test :
192
- runs-on : ubuntu-latest
193
- steps :
194
- - uses : actions/checkout@v3
195
- - name : Install toolchain
196
- uses : dtolnay/rust-toolchain@stable
197
- - uses : Swatinem/rust-cache@v2
198
- - name : Run doctests
199
- run : cargo test --doc --all --all-features
200
-
201
45
doc-lint :
46
+ name : doc lint
202
47
runs-on : ubuntu-latest
203
48
steps :
204
49
- uses : actions/checkout@v3
@@ -207,43 +52,3 @@ jobs:
207
52
- uses : Swatinem/rust-cache@v2
208
53
- name : Check if documentation builds
209
54
run : RUSTDOCFLAGS="-D warnings" cargo doc --all --no-deps --all-features --document-private-items
210
-
211
- benchmarks :
212
- # Pin to `20.04` instead of `ubuntu-latest`, until ubuntu-latest migration is complete
213
- # See also <https://github.com/foundry-rs/foundry/issues/3827>
214
- runs-on : ubuntu-20.04
215
- steps :
216
- - name : Install Valgrind
217
- run : |
218
- sudo apt install valgrind
219
-
220
- - name : Checkout PR sources
221
- uses : actions/checkout@v3
222
- with :
223
- ref : main
224
-
225
- - uses : Swatinem/rust-cache@v1
226
- with :
227
- cache-on-failure : true
228
-
229
- - name : Generate test-vectors
230
- uses : actions-rs/cargo@v1
231
- with :
232
- command : run
233
- args : --bin reth -- test-vectors tables
234
-
235
- - name : Set main baseline
236
- uses : actions-rs/cargo@v1
237
- with :
238
- command : bench
239
- args : --package reth-db --bench iai
240
-
241
- - name : Checkout main sources
242
- uses : actions/checkout@v3
243
- with :
244
- clean : false
245
-
246
- - name : Compare PR benchmark
247
- shell : ' script -q -e -c "bash {0}"' # required to workaround /dev/tty not being available
248
- run : |
249
- ./.github/scripts/compare_iai.sh
0 commit comments