-
Notifications
You must be signed in to change notification settings - Fork 270
63 lines (58 loc) · 1.88 KB
/
fuzzers.yml
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
name: fuzzers
on:
# Only run on PRs that touch fuzzed crates
pull_request:
paths:
- 'linkerd/addr/**'
- 'linkerd/app/inbound/**'
- 'linkerd/dns/**'
- 'linkerd/proxy/http/**'
- 'linkerd/tls/**'
- 'linkerd/transport-header/**'
- .github/workflows/fuzzers.yml
- .github/fuzzers-list.sh
env:
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10
RUST_BACKTRACE: short
RUSTFLAGS: "-D warnings -A deprecated"
RUSTUP_MAX_RETRIES: 10
permissions:
contents: read
jobs:
list-changed:
timeout-minutes: 3
runs-on: ubuntu-latest
container: docker://rust:1.69.0-bullseye
steps:
- run: apt update && apt install -y jo
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- run: git config --global --add safe.directory "$PWD" # actions/runner#2033
- uses: tj-actions/changed-files@8238a4103220c636f2dad328ead8a7c8dbe316a3
id: changed-files
- name: list changed crates
id: list-changed
shell: bash
run: |
dirs=$(.github/fuzzers-list.sh ${{ steps.changed-files.outputs.all_changed_files }} | jo -a)
echo "dirs=$dirs" >> "$GITHUB_OUTPUT"
outputs:
dirs: ${{ steps.list-changed.outputs.dirs }}
# Build fuzzers for any changed crates.
build:
needs: [list-changed]
timeout-minutes: 40
runs-on: ubuntu-latest
container: docker://rust:1.69.0-bullseye
strategy:
matrix:
dir: ${{ fromJson(needs.list-changed.outputs.dirs) }}
steps:
- run: rustup toolchain add nightly
- run: cargo install cargo-fuzz
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- run: git config --global --add safe.directory "$PWD" # actions/runner#2033
- working-directory: ${{matrix.dir}}
run: cargo +nightly fetch
- working-directory: ${{matrix.dir}}
run: cargo +nightly fuzz build