Repository navigation
72 lines (62 loc) · 2.11 KB
/
Copy pathfuzz.yml
File metadata and controls
72 lines (62 loc) · 2.11 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
name: Fuzz
# Each fuzz target of tools/fuzz_targets.py for a quarter of an hour, in the
# AddressSanitizer build of tools/sanitizers.py; the sanitizer job of ci.yml gives them a
# minute each. Every run starts from the corpus in tests/fuzz/: an input that fails a
# target is uploaded, and goes into the corpus with the fix. It runs weekly, by hand,
# and when a target, the corpus or this workflow changes.
on:
push:
branches: [ main, 'release/**' ]
paths: &fuzz-paths
- tools/fuzz.py
- tools/fuzz_targets.py
- tests/fuzz/**
- .github/workflows/fuzz.yml
pull_request:
branches: [ main, 'release/**' ]
paths: *fuzz-paths
schedule:
- cron: '53 4 * * 1'
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
fuzz:
strategy:
fail-fast: false
matrix:
target: [ load, pixels, digest ]
runs-on: ubuntu-24.04
timeout-minutes: 45
name: fuzz (${{ matrix.target }})
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: ./.github/actions/setup
- name: Install Clang and its sanitizer runtimes
run: |
sudo apt-get update
sudo apt-get install -y clang libclang-rt-18-dev
- name: Build under AddressSanitizer
run: uv run --no-project python tools/sanitizers.py build address
- name: Fuzz for 15 minutes
run: |
mkdir -p fuzz-crashes
.venv/bin/python tools/sanitizers.py run fuzz sanitizer-logs -- \
.venv/bin/python tools/fuzz.py ${{ matrix.target }} -max_total_time=900 \
-max_len=65536 -artifact_prefix=fuzz-crashes/
- name: Sanitizer reports
if: ${{ !cancelled() }}
run: .venv/bin/python tools/sanitizers.py check sanitizer-logs
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
if: failure()
with:
name: fuzz-${{ matrix.target }}
path: |
sanitizer-logs/
fuzz-crashes/
if-no-files-found: ignore