diff options
Diffstat (limited to '.github/workflows/oss-fuzz.yml')
-rw-r--r-- | .github/workflows/oss-fuzz.yml | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/.github/workflows/oss-fuzz.yml b/.github/workflows/oss-fuzz.yml new file mode 100644 index 00000000..2c6bbf5e --- /dev/null +++ b/.github/workflows/oss-fuzz.yml @@ -0,0 +1,30 @@ +name: OSS-Fuzz build + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + + workflow_dispatch: + +jobs: + + oss_fuzz: + runs-on: ubuntu-20.04 + container: gcr.io/oss-fuzz-base/base-builder-jvm + + steps: + - name: Adding github workspace as safe directory + # See issue https://github.com/actions/checkout/issues/760 + run: git config --global --add safe.directory $GITHUB_WORKSPACE + + - uses: actions/checkout@v2 + + - name: Build Jazzer + # Keep in sync with https://github.com/google/oss-fuzz/blob/221b39181a372ff16c0c813c5963a08aa58f19e2/infra/base-images/base-builder/install_java.sh#L33. + run: bazel build --java_runtime_version=local_jdk_15 -c opt --cxxopt="-stdlib=libc++" --linkopt=-lc++ //agent:jazzer_agent_deploy.jar //driver:jazzer_driver //driver:jazzer_driver_asan //driver:jazzer_driver_ubsan //agent:jazzer_api_deploy.jar + + - name: Test Jazzer build + # Keep in sync with https://github.com/google/oss-fuzz/blob/221b39181a372ff16c0c813c5963a08aa58f19e2/infra/base-images/base-builder/install_java.sh#L35-L36. + run: "test -f bazel-bin/agent/jazzer_agent_deploy.jar && test -f bazel-bin/driver/jazzer_driver && test -f bazel-bin/driver/jazzer_driver_asan && test -f bazel-bin/driver/jazzer_driver_ubsan && test -f bazel-bin/agent/jazzer_api_deploy.jar" |