forked from qdrant/vector-db-benchmark
-
Notifications
You must be signed in to change notification settings - Fork 14
99 lines (88 loc) · 2.88 KB
/
Copy pathfuzz.yml
File metadata and controls
99 lines (88 loc) · 2.88 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
name: Fuzz
on:
schedule:
# Nightly at 03:00 UTC.
- cron: "0 3 * * *"
workflow_dispatch:
inputs:
max_total_time:
description: "Per-target fuzzing time in seconds"
required: false
default: "600"
permissions:
contents: read
jobs:
fuzz:
name: fuzz ${{ matrix.target }}
runs-on: ubuntu-latest
strategy:
# Don't cancel the other targets when one finds a crash.
fail-fast: false
matrix:
# Each entry is a fuzz target plus an optional libFuzzer dictionary
# (basename under fuzz/dictionaries/, without the .dict suffix).
include:
- target: sparse_reader
dict: csr
- target: npy_reader
dict: npy
- target: jsonl_reader
dict: json
- target: compound_payloads
dict: json
- target: metadata
dict: json
- target: parse_info
dict: info
- target: datetime
dict: datetime
- target: ft_search
dict: resp
- target: compound_queries
dict: json
- target: compound_data
dict: json
- target: sparse_roundtrip
dict: csr
- target: npy_roundtrip
dict: npy
steps:
- uses: actions/checkout@v4
- name: Install system dependencies
run: sudo apt-get update && sudo apt-get install -y libhdf5-dev pkg-config
- name: Install nightly toolchain
uses: dtolnay/rust-toolchain@nightly
- uses: Swatinem/rust-cache@v2
with:
workspaces: |
.
fuzz
- name: Install cargo-fuzz
run: cargo install cargo-fuzz --locked
# Persist/restore the fuzzing corpus so coverage accumulates across nights.
- name: Restore corpus cache
uses: actions/cache@v4
with:
path: fuzz/corpus/${{ matrix.target }}
key: fuzz-corpus-${{ matrix.target }}-${{ github.run_id }}
restore-keys: |
fuzz-corpus-${{ matrix.target }}-
- name: Build fuzz targets
run: cargo fuzz build ${{ matrix.target }}
- name: Run fuzzer (high effort)
run: |
DICT_ARG=""
if [ -n "${{ matrix.dict }}" ] && [ -f "fuzz/dictionaries/${{ matrix.dict }}.dict" ]; then
DICT_ARG="-dict=fuzz/dictionaries/${{ matrix.dict }}.dict"
fi
cargo fuzz run ${{ matrix.target }} -- \
-max_total_time=${{ github.event.inputs.max_total_time || '600' }} \
-rss_limit_mb=4096 -timeout=25 $DICT_ARG
# On crash the previous step fails; upload the reproducers before failing.
- name: Upload crash artifacts
if: failure()
uses: actions/upload-artifact@v4
with:
name: fuzz-crashes-${{ matrix.target }}
path: fuzz/artifacts/**
if-no-files-found: ignore