mirror of https://github.com/google/oss-fuzz.git
Add CIFuzz documentation on how to run jobs on certain branches, paths (#4113)
This commit is contained in:
parent
7b9a3a895c
commit
55a4e1d88a
|
@ -79,7 +79,6 @@ jobs:
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Optional configuration
|
### Optional configuration
|
||||||
|
|
||||||
#### Configurable Variables
|
#### Configurable Variables
|
||||||
|
@ -136,6 +135,54 @@ jobs:
|
||||||
{% endraw %}
|
{% endraw %}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### Branches and paths
|
||||||
|
|
||||||
|
You can make CIFuzz trigger only on certain branches or paths by following the
|
||||||
|
instructions [here](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions).
|
||||||
|
For example, the following code can used to trigger CIFuzz only on changes to
|
||||||
|
C/C++ code residing on master and release branches:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
name: CIFuzz
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
- 'releases/**'
|
||||||
|
paths:
|
||||||
|
- '**.c'
|
||||||
|
- '**.cc'
|
||||||
|
- '**.cpp'
|
||||||
|
- '**.cxx'
|
||||||
|
- '**.h'
|
||||||
|
jobs:
|
||||||
|
Fuzzing:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Build Fuzzers
|
||||||
|
id: build
|
||||||
|
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
|
||||||
|
with:
|
||||||
|
oss-fuzz-project-name: 'example'
|
||||||
|
dry-run: false
|
||||||
|
- name: Run Fuzzers
|
||||||
|
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
|
||||||
|
with:
|
||||||
|
oss-fuzz-project-name: 'example'
|
||||||
|
fuzz-seconds: 600
|
||||||
|
dry-run: false
|
||||||
|
- name: Upload Crash
|
||||||
|
uses: actions/upload-artifact@v1
|
||||||
|
if: failure() && steps.build.outcome == 'success'
|
||||||
|
with:
|
||||||
|
name: artifacts
|
||||||
|
path: ./out/artifacts
|
||||||
|
```
|
||||||
|
|
||||||
|
You can checkout CIFuzz configs for OSS-Fuzz projects. Example -
|
||||||
|
[systemd](https://github.com/systemd/systemd/blob/master/.github/workflows/cifuzz.yml),
|
||||||
|
[curl](https://github.com/curl/curl/blob/master/.github/workflows/fuzz.yml).
|
||||||
|
|
||||||
## Understanding results
|
## Understanding results
|
||||||
|
|
||||||
The results of CIFuzz can be found in two different places.
|
The results of CIFuzz can be found in two different places.
|
||||||
|
|
Loading…
Reference in New Issue