summaryrefslogtreecommitdiffstats
path: root/third_party/jpeg-xl/.github/workflows/fuzz.yml
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/jpeg-xl/.github/workflows/fuzz.yml')
-rw-r--r--third_party/jpeg-xl/.github/workflows/fuzz.yml56
1 files changed, 56 insertions, 0 deletions
diff --git a/third_party/jpeg-xl/.github/workflows/fuzz.yml b/third_party/jpeg-xl/.github/workflows/fuzz.yml
new file mode 100644
index 0000000000..188a4c79c7
--- /dev/null
+++ b/third_party/jpeg-xl/.github/workflows/fuzz.yml
@@ -0,0 +1,56 @@
+# Copyright (c) the JPEG XL Project Authors. All rights reserved.
+#
+# Use of this source code is governed by a BSD-style
+# license that can be found in the LICENSE file.
+
+# CI on pull-requests to run the fuzzer from oss-fuzz. See:
+#
+# https://google.github.io/oss-fuzz/getting-started/continuous-integration/
+
+name: CIFuzz
+on:
+ pull_request:
+ types: [opened, reopened, synchronize]
+ paths:
+ - '**.c'
+ - '**.cc'
+ - '**.cmake'
+ - '**.h'
+ - '**CMakeLists.txt'
+ - .github/workflows/fuzz.yml
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
+ cancel-in-progress: ${{ github.event_name == 'pull_request' }}
+
+jobs:
+ fuzzing:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout source
+ uses: actions/checkout@v2
+ id: checkout
+ with:
+ # The build_fuzzers action checks out the code to the storage/libjxl
+ # directory already, but doesn't check out the submodules. This step
+ # is a workaround for checking out the submodules.
+ path: storage/libjxl
+ submodules: true
+ - name: Build Fuzzers
+ id: build
+ uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
+ with:
+ oss-fuzz-project-name: 'libjxl'
+ language: c++
+ - name: Run Fuzzers
+ uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
+ with:
+ oss-fuzz-project-name: 'libjxl'
+ language: c++
+ fuzz-seconds: 600
+ - name: Upload Crash
+ uses: actions/upload-artifact@v1
+ if: failure() && steps.build.outcome == 'success'
+ with:
+ name: artifacts
+ path: ./out/artifacts