-
Notifications
You must be signed in to change notification settings - Fork 12
55 lines (51 loc) · 1.3 KB
/
fuzz.yml
File metadata and controls
55 lines (51 loc) · 1.3 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
name: Fuzz
on:
push:
branches: ['main']
pull_request:
# Allow manual trigger
workflow_dispatch:
# Run fuzz tests daily
schedule:
- cron: '0 0 * * *'
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
fuzz:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target:
- fuzz_dtls_packet
- fuzz_record_parse
- fuzz_dtls13_packet
- fuzz_dtls13_record_parse
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: nightly
- name: Install cargo-fuzz
run: cargo install cargo-fuzz
- name: Cache fuzz corpus
uses: actions/cache@v5
with:
path: fuzz/corpus
key: fuzz-corpus-${{ matrix.target }}-${{ github.sha }}
restore-keys: |
fuzz-corpus-${{ matrix.target }}-
- name: Run fuzz target
run: |
cargo fuzz run ${{ matrix.target }} -- \
-max_total_time=60 \
-max_len=65536
- name: Upload crash artifacts
if: failure()
uses: actions/upload-artifact@v7
with:
name: crash-${{ matrix.target }}
path: fuzz/artifacts/${{ matrix.target }}/