Important
This only works on Linux.
directory:
description: The directory of the grammar
corpus:
description: The directory of the seed corpus
timeout:
description: The time to wait if the fuzzer hangs
default: 10
max-time:
description: The maximum total fuzzing time
default: 60
max-length:
description: The maximum fuzz input length
default: 4096
tree-sitter-version:
description: The tree-sitter version to install
default: latest
name: Fuzz parser
on:
push:
branches: [master]
paths:
- src/scanner.c
pull_request:
paths:
- src/scanner.c
jobs:
test:
name: Parser fuzzing
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: tree-sitter/fuzz-action@v4
pkg-config
make
jq
llvm
tree-sitter
library
make LANG_NAME=parser LANG_DIR=/path/to/tree-sitter-parser
Tip
Check the Makefile for more options.
Based on vigoux/tree-sitter-fuzz-action