From 96d1dc8ab78cc5313a36638ec218d3f2e3da9cfa Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Sat, 13 Feb 2021 21:26:21 -0700 Subject: [PATCH] Add CIFuzz workflow to run fuzzers on push or PR. https://google.github.io/oss-fuzz/getting-started/continuous-integration/ --- .github/workflows/main.yml | 40 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 000000000..3e4e69d15 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,40 @@ +# See: https://google.github.io/oss-fuzz/getting-started/continuous-integration/ + +name: CIFuzz +on: + # Trigger the workflow on push or pull requests, but only for the + # master branch and only for C source files. + push: + branches: + - master + paths: + - '**.c' + - '**.h' + pull_request: + branches: + - master + paths: + - '**.c' + - '**.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: 'sudoers' + dry-run: false + - name: Run Fuzzers + uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master + with: + oss-fuzz-project-name: 'sudoers' + 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