Repository navigation
58 lines (50 loc) · 1.73 KB
/
Copy pathfuzz.yml
File metadata and controls
58 lines (50 loc) · 1.73 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
name: Fuzz
# Runs the libFuzzer targets in test/fuzz: two minutes on every push and pull
# request, and a longer run once a week.
on:
push:
pull_request:
schedule:
- cron: '37 5 * * 3'
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
fuzz:
name: fuzz trace readers
runs-on: ubuntu-latest
timeout-minutes: 45
env:
FUZZ_SECONDS: ${{ github.event_name == 'schedule' && 1200 || 120 }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y clang libclang-rt-dev cmake ninja-build libglib2.0-dev libzstd-dev
- name: Build fuzz targets
run: |
cmake -G Ninja -B _build_fuzz \
-DENABLE_FUZZING=ON -DENABLE_TESTS=OFF \
-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_BUILD_TYPE=RelWithDebInfo -DLOG_LEVEL=error
ninja -C _build_fuzz fuzz_traceReader
- name: Fuzz trace readers
run: |
bash test/fuzz/make_seed_corpus.sh corpus
mkdir -p crashes
_build_fuzz/bin/fuzz_traceReader corpus \
-max_total_time="${FUZZ_SECONDS}" -rss_limit_mb=4096 \
-artifact_prefix=crashes/ -print_final_stats=1
- name: Upload crashing inputs
if: failure()
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: fuzz-crashes
path: crashes/
retention-days: 30