-
Notifications
You must be signed in to change notification settings - Fork 19
43 lines (43 loc) · 1.5 KB
/
fuzz.yml
File metadata and controls
43 lines (43 loc) · 1.5 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
name: Fuzz test
on:
push:
jobs:
run-fuzz:
runs-on: ubuntu-latest
strategy:
matrix:
directory: [libdd-alloc, libdd-profiling, libdd-common-ffi, libdd-trace-utils]
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
- name: Set up Rust
run: |
set -e
rustup set profile minimal
rustup toolchain install nightly-2024-12-16
rustup default nightly-2024-12-16
- uses: taiki-e/install-action@2c41309d51ede152b6f2ee6bf3b71e6dc9a8b7df # 2.49.27
with:
tool: cargo-bolero
- name: Cache [rust]
uses: Swatinem/rust-cache@f13886b937689c021905a6b90929199931d60db1 # 2.8.1
with:
cache-targets: true # cache build artifacts
cache-bin: true # cache the ~/.cargo/bin directory
- run: |
set -e
# cargo bolero list outputs {"package":"package-name","test":"test-name"}
pushd ${{ matrix.directory }}
cargo bolero list | \
# And the following command will parse package-name's and test-name's one in each line
grep -oP '"(package|test)"\s*:\s*"\K[^"]+' | \
# awk will stitch package and test names back separated by a tab
awk 'NR%2{printf "%s\t", $0; next}1' | \
while read -r package test;
do
echo "****** Starting bolero test for $package $test ******" 1>&2
cargo bolero test -T 30s --package $package $test
done
popd