-
Notifications
You must be signed in to change notification settings - Fork 0
87 lines (75 loc) · 2.47 KB
/
Copy pathfuzz.yml
File metadata and controls
87 lines (75 loc) · 2.47 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
# SPDX-FileCopyrightText: Copyright © 2026 ReallyMe LLC. All rights reserved
#
# SPDX-License-Identifier: Apache-2.0
name: Fuzz
on:
pull_request:
paths:
- ".github/workflows/fuzz.yml"
- "Cargo.toml"
- "crates/codec/**"
- "crates/proto/**"
- "fuzz/**"
push:
branches:
- main
paths:
- ".github/workflows/fuzz.yml"
- "Cargo.toml"
- "crates/codec/**"
- "crates/proto/**"
- "fuzz/**"
schedule:
- cron: "37 3 * * 1"
workflow_dispatch:
permissions:
contents: read
jobs:
build:
name: fuzz target build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
- name: Install Rust nightly
uses: dtolnay/rust-toolchain@fa04a1451ff1842e2626ccb99004d0195b455a88 # master
with:
toolchain: nightly-2026-07-01
- name: Install cargo-fuzz
run: cargo install --git https://github.com/rust-fuzz/cargo-fuzz.git --rev 984c861c8dfea28055254c5f1d2659ab2cd63f76 --locked cargo-fuzz
- name: Build fuzz targets
run: cargo +nightly-2026-07-01 fuzz build
scheduled:
name: scheduled fuzz (${{ matrix.target }})
runs-on: ubuntu-latest
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
strategy:
fail-fast: false
matrix:
target:
- base64url
- dag_cbor
- deterministic_cbor
- multibase
- multicodec
- multikey
- operation_contract
- jcs_text
steps:
- name: Checkout
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
- name: Install Rust nightly
uses: dtolnay/rust-toolchain@fa04a1451ff1842e2626ccb99004d0195b455a88 # master
with:
toolchain: nightly-2026-07-01
- name: Install cargo-fuzz
run: cargo install --git https://github.com/rust-fuzz/cargo-fuzz.git --rev 984c861c8dfea28055254c5f1d2659ab2cd63f76 --locked cargo-fuzz
- name: Run time-boxed fuzz target
run: cargo +nightly-2026-07-01 fuzz run ${{ matrix.target }} -- -max_total_time=300 -rss_limit_mb=4096
- name: Upload crash artifacts
if: failure()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: fuzz-artifacts-${{ matrix.target }}
path: fuzz/artifacts/${{ matrix.target }}
if-no-files-found: ignore