aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/oss-fuzz.yml
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-07-07 05:02:55 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-07-07 05:02:55 +0000
commit8f55244a1333bec0a96af10653a33ba7f68a267f (patch)
tree3243e58e56d3a8dee60c582a2c917d18edc9bd5a /.github/workflows/oss-fuzz.yml
parenta74c14e5721cfd85dd0d0ebc3789ac0657564b7b (diff)
parentba37c2e361c2ba91bacc47fcae5383c52e50f6be (diff)
downloadjazzer-api-8f55244a1333bec0a96af10653a33ba7f68a267f.tar.gz
Change-Id: I74e7a34d5bfaf65a56951756023cd21521dca326
Diffstat (limited to '.github/workflows/oss-fuzz.yml')
-rw-r--r--.github/workflows/oss-fuzz.yml30
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"