Fuzzing #6
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Fuzzing | |
| on: | |
| # Uncomment to enable scheduled runs. | |
| #schedule: | |
| # Run every day at 22 CET | |
| # - cron: '0 21 * * *' | |
| pull_request: | |
| branches: [ main ] | |
| merge_group: | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build_and_test: | |
| runs-on: ${{ matrix.os }} | |
| name: Build & Test | |
| strategy: | |
| matrix: | |
| os: [ubuntu-22.04, macos-14] | |
| jdk: [21, 8] | |
| include: | |
| - jdk: 21 | |
| # Workaround for https://github.com/bazelbuild/bazel/issues/14502 | |
| extra_bazel_args: "--jvmopt=-Djava.security.manager=allow" | |
| - os: ubuntu-22.04 | |
| arch: "linux" | |
| - os: macos-14 | |
| arch: "macos-arm64" | |
| bazel_args: "--xcode_version_config=//.github:host_xcodes" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up JDK | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: zulu | |
| java-version: 21 | |
| - name: Set Build Buddy config | |
| run: .github/scripts/echoBuildBuddyConfig.sh ${{ secrets.BUILDBUDDY_API_KEY }} >> $GITHUB_ENV | |
| shell: bash | |
| - name: Cache Fuzzing Corpus | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/fuzzing-corpus | |
| key: fuzzing-corpus-${{ matrix.os }}-${{ matrix.jdk }}-${{ github.run_id }}-${{ github.run_attempt }} | |
| restore-keys: | | |
| fuzzing-corpus- | |
| - name: Build & Fuzz | |
| run: | | |
| mkdir -p ~/fuzzing-corpus/ArgumentsMutatorFuzzTest | |
| bazelisk run ${{env.BUILD_BUDDY_CONFIG}} --java_runtime_version=remotejdk_${{ matrix.jdk }} ${{ matrix.bazel_args }} ${{ matrix.extra_bazel_args }} //selffuzz/src/test/java/com/code_intelligence/selffuzz/mutation:ArgumentsMutatorFuzzTest --jvmopt=-Xmx8000m -- -runs=1000000 ~/fuzzing-corpus/ArgumentsMutatorFuzzTest | |
| # Slack notification on failure | |
| notification: | |
| needs: build_and_test | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Send Slack notification to cifuzz dev channel | |
| if: failure() | |
| uses: slackapi/slack-github-action@v2.1.1 | |
| with: | |
| webhook: ${{ secrets.SLACK_WEBHOOK_URL }} | |
| method: chat.postMessage | |
| payload: | | |
| workflow_url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} |