Skip to content

Commit 06c21b5

Browse files
Merge pull request #157 from Kijewski/pr-corpus
fuzz: add minified corpus after 1,000,000,000 runs
2 parents 47bd8b7 + 785aea3 commit 06c21b5

File tree

5 files changed

+35
-2
lines changed

5 files changed

+35
-2
lines changed

.github/workflows/rust.yml

+28
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ on:
77
schedule:
88
- cron: "32 4 * * 5"
99

10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
1014
jobs:
1115
Test:
1216
strategy:
@@ -151,3 +155,27 @@ jobs:
151155
cargo sort --check --check-format --grouped
152156
cd - > /dev/null
153157
done
158+
159+
Fuzz:
160+
strategy:
161+
matrix:
162+
fuzz_target:
163+
- all
164+
- filters
165+
- html
166+
- parser
167+
runs-on: ubuntu-latest
168+
steps:
169+
- uses: actions/checkout@v4
170+
with:
171+
submodules: recursive
172+
- uses: dtolnay/rust-toolchain@master
173+
with:
174+
toolchain: nightly
175+
components: rust-src
176+
- run: curl --location --silent --show-error --fail https://github.com/cargo-bins/cargo-quickinstall/releases/download/cargo-fuzz-0.12.0/cargo-fuzz-0.12.0-x86_64-unknown-linux-gnu.tar.gz | tar -xzvvf - -C $HOME/.cargo/bin
177+
- uses: Swatinem/rust-cache@v2
178+
- run: cargo fuzz run ${{ matrix.fuzz_target }} --jobs 4 -- -max_total_time=90
179+
working-directory: fuzzing
180+
env:
181+
RUSTFLAGS: '-Ctarget-feature=-crt-static'

.gitmodules

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[submodule "fuzzing/fuzz/corpus"]
2+
path = fuzzing/fuzz/corpus
3+
url = https://github.com/rinja-rs/fuzzing-corpus.git
4+
branch = main

fuzzing/fuzz/.gitignore

-2
This file was deleted.

fuzzing/fuzz/artifacts/.gitattributes

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
* -text -diff binary
2+
.gitattributes text diff

fuzzing/fuzz/corpus

Submodule corpus added at dde6884

0 commit comments

Comments
 (0)