This repository has been archived by the owner on Nov 5, 2023. It is now read-only.
forked from paradigmxyz/reth
-
Notifications
You must be signed in to change notification settings - Fork 3
75 lines (69 loc) · 1.93 KB
/
fuzz.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
on:
pull_request:
merge_group:
push:
branches: [main]
env:
CARGO_TERM_COLOR: always
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
name: fuzz
jobs:
all:
# Skip the Fuzzing Jobs until we make them run fast and reliably. Currently they will
# always recompile the codebase for each test and that takes way too long.
if: false
runs-on:
group: Reth
strategy:
matrix:
target:
- reth-primitives
- reth-db
- reth-eth-wire
- reth-codecs
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Install toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: llvm-tools-preview
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- name: Install fuzzer
uses: actions-rs/cargo@v1
with:
command: install
args: cargo-test-fuzz afl
- name: Force install cargo-afl
run: |
cargo install --force afl
cargo afl --version
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Run fuzz tests
run: |
./.github/scripts/fuzz.sh ${{ matrix.target }}
env:
AFL_I_DONT_CARE_ABOUT_MISSING_CRASHES: 1
- name: Upload coverage data to codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: lcov.info
flags: fuzz-tests
fuzz-success:
if: always()
name: fuzz success
runs-on: ubuntu-20.04
needs: all
steps:
# Note: This check is a dummy because we currently have fuzz tests disabled.
- run: echo OK.
#- name: Decide whether the needed jobs succeeded or failed
# uses: re-actors/alls-green@release/v1
# with:
# jobs: ${{ toJSON(needs) }}