File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change 89
89
cargo install cargo-fuzz
90
90
cargo install rustfilt
91
91
92
+ - name : Cache fuzz corpus
93
+ uses : actions/cache@v4
94
+ with :
95
+ path : fuzz/corpus
96
+ key : fuzz-corpus-all-${{ github.sha }}
97
+ restore-keys : |
98
+ fuzz-corpus-all-
99
+ fuzz-corpus-
100
+
101
+ - name : Generate minimal corpus if needed
102
+ run : |
103
+ for target in protocol_parsing jsonrpc_handling transport_layer auth_flows; do
104
+ # Create corpus directory if it doesn't exist
105
+ mkdir -p fuzz/corpus/$target
106
+
107
+ # If corpus is empty, run fuzzer briefly to generate some inputs
108
+ if [ -z "$(ls -A fuzz/corpus/$target 2>/dev/null)" ]; then
109
+ echo "No corpus found for $target, generating minimal corpus..."
110
+ cargo fuzz run $target -- \
111
+ -max_total_time=10 \
112
+ -print_final_stats=1 \
113
+ -detect_leaks=0 || true
114
+ fi
115
+ done
116
+
92
117
- name : Generate coverage
93
118
run : |
94
119
for target in protocol_parsing jsonrpc_handling transport_layer auth_flows; do
You can’t perform that action at this time.
0 commit comments