Repository navigation
75 lines (70 loc) · 2.42 KB
/
Copy pathfuzz.yml
File metadata and controls
75 lines (70 loc) · 2.42 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
name: Fuzz
on:
pull_request:
types: [ opened, synchronize, reopened ]
branches:
- '**'
push:
branches: [ "master" ]
schedule:
- cron: '41 5 * * *'
workflow_dispatch:
# Third-party actions are pinned to full commit SHAs (tag comments alongside).
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
# Longer runs on the nightly schedule; short smoke runs on PRs/pushes.
FUZZ_SECONDS: ${{ github.event_name == 'schedule' && '300' || '90' }}
jobs:
fuzz:
name: Fuzz (${{ matrix.target }})
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
target:
- changeset_roundtrip
- corrupt_rows
- anchor_identity
- descriptor_validation
steps:
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
- uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c # nightly
with:
toolchain: nightly
components: rustfmt, clippy, rust-src
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2
with:
workspaces: "fuzz -> fuzz/target"
- uses: taiki-e/install-action@7f4eb899022d8fe70b20c4f3de697aa85c309026 # v2
with:
tool: cargo-fuzz
- name: Check fuzz crate formatting
run: cargo +nightly fmt --manifest-path fuzz/Cargo.toml -- --check
- name: Lint fuzz crate
run: cargo +nightly clippy --manifest-path fuzz/Cargo.toml --all-targets -- -D warnings
- name: Build fuzz target
working-directory: fuzz
run: cargo +nightly fuzz build ${{ matrix.target }} --target x86_64-unknown-linux-gnu
- name: Run fuzz target
working-directory: fuzz
run: |
cargo +nightly fuzz run ${{ matrix.target }} --target x86_64-unknown-linux-gnu -- \
-max_total_time=${FUZZ_SECONDS} \
-max_len=4096 \
-rss_limit_mb=4096 \
-use_value_profile=1 \
-print_final_stats=1
- name: Upload failing corpus
if: failure()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: fuzz-artifacts-${{ matrix.target }}
path: fuzz/artifacts
if-no-files-found: ignore