-
Notifications
You must be signed in to change notification settings - Fork 56
57 lines (51 loc) · 1.53 KB
/
fuzz.yml
File metadata and controls
57 lines (51 loc) · 1.53 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
on:
push:
branches:
- main
pull_request:
paths:
- "compact_str/**"
- "fuzz/**"
- ".github/workflows/fuzz.yml"
- "!CHANGELOG.md"
- "!**/README.md"
workflow_dispatch:
# schedule:
# - cron: '0 01,13 * * *'
name: Fuzz
env:
CARGO_TERM_COLOR: "always"
RUSTFLAGS: "-D warnings -Zrandomize-layout"
RUST_NIGHTLY_VERSION: "nightly-2025-12-18"
jobs:
libFuzzer_x86_64:
name: libFuzzer [x86_64]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
name: Checkout compact_str
- name: Install toolchain
run: |
rustup toolchain install ${{ env.RUST_NIGHTLY_VERSION }} --no-self-update
rustup override set ${{ env.RUST_NIGHTLY_VERSION }}
- name: Install cargo-fuzz
run: |
cargo install cargo-fuzz
- uses: Swatinem/rust-cache@v2
- name: Set Fuzz Time
run: |
if [[ "${{github.event_name}}" == "push" || "${{github.event_name}}" == "pull_request" ]]; then
echo "fuzz_time=120" >> $GITHUB_ENV
else
echo "fuzz_time=1800" >> $GITHUB_ENV
fi
echo "${{ env.fuzz_time }}"
- name: Fuzz!
run: cargo fuzz run --features=libfuzzer-sys --debug-assertions compact_str -- -max_total_time=${{ env.fuzz_time }}
# - name: File Issue (if failure found)
# if: failure()
# uses: JasonEtco/create-an-issue@v2.9
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# update_existing: true