aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/oss-fuzz.yml
blob: 2c6bbf5ec5fc192ac9e0e5ce8b83f79d48f908d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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"