aboutsummaryrefslogtreecommitdiffhomepage
path: root/docs
diff options
context:
space:
mode:
authorGravatar Abhishek Arya <inferno@chromium.org>2020-07-13 14:50:16 -0700
committerGravatar GitHub <noreply@github.com>2020-07-13 14:50:16 -0700
commit55a4e1d88af237384189a20ec2aa469ac3bad290 (patch)
tree8750d20c82018f3cd991ad88c031d5c8f5a46ee1 /docs
parent7b9a3a895c6aff4b372b9f5700f0f5e875891983 (diff)
Add CIFuzz documentation on how to run jobs on certain branches, paths (#4113)
Diffstat (limited to 'docs')
-rw-r--r--docs/getting-started/continuous_integration.md49
1 files changed, 48 insertions, 1 deletions
diff --git a/docs/getting-started/continuous_integration.md b/docs/getting-started/continuous_integration.md
index fc964026..0ebe5d1b 100644
--- a/docs/getting-started/continuous_integration.md
+++ b/docs/getting-started/continuous_integration.md
@@ -79,7 +79,6 @@ jobs:
```
-
### Optional configuration
#### Configurable Variables
@@ -136,6 +135,54 @@ jobs:
{% 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
The results of CIFuzz can be found in two different places.