Skip to content

Commit b4632c0

Browse files
chore: only run fuzzers on certain file changes (#9246)
The `bazel-run-fuzzers` takes ~8 minutes. We shouldn't need to wait for that if no code that's an input to that job has changed. So this adds a condition to the steps to only run them if the following files have been modified: - `.github/workflows/ci-main.yml` - `ci/container/TAG` - `bin/fuzzing/run-all-fuzzers.sh` - `**/BUILD.bazel` - `**/*.bzl` - `**/*.rs` --------- Co-authored-by: venkkatesh-sekar <94061546+venkkatesh-sekar@users.noreply.github.com>
1 parent df79439 commit b4632c0

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

.github/workflows/ci-main.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,30 @@ jobs:
3737
with:
3838
fetch-depth: ${{ github.event_name == 'pull_request' && 256 || 0 }}
3939
ref: ${{ inputs.commit-sha }}
40+
- name: Filter fuzzer related files
41+
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3
42+
id: filter
43+
with:
44+
ref: ${{ inputs.commit-sha }}
45+
filters: |
46+
fuzzers:
47+
- ".github/workflows/ci-main.yml"
48+
- "ci/container/TAG"
49+
- "bin/fuzzing/*.sh"
50+
- "**/BUILD.bazel"
51+
- "**/*.bzl"
52+
- "**/*.rs"
4053
- uses: ./.github/actions/netrc
54+
if: steps.filter.outputs.fuzzers == 'true'
4155
- name: Run Libfuzzer targets
4256
uses: ./.github/actions/bazel
57+
if: steps.filter.outputs.fuzzers == 'true'
4358
with:
4459
invocation-names: libfuzzer
4560
run: ./bin/fuzzing/run-all-fuzzers.sh --libfuzzer 100
4661
- name: Run AFL targets
4762
uses: ./.github/actions/bazel
63+
if: steps.filter.outputs.fuzzers == 'true'
4864
with:
4965
invocation-names: afl
5066
run: ./bin/fuzzing/run-all-fuzzers.sh --afl 10

0 commit comments

Comments
 (0)