-
Notifications
You must be signed in to change notification settings - Fork 165
74 lines (62 loc) · 2.24 KB
/
fuzzing.yml
File metadata and controls
74 lines (62 loc) · 2.24 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: Fuzzing
on:
schedule:
# At 03:00 UTC (01:00 CEST) every day
- cron: '0 3 * * *'
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: Fuzzing
strategy:
fail-fast: false
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@v6
- name: Set up JDK
uses: actions/setup-java@v5
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@v5
with:
path: |
selffuzz/src/test/resources/.corpus
key: fuzzing-corpus-${{ matrix.os }}-${{ matrix.jdk }}-${{ github.run_id }}-${{ github.run_attempt }}
restore-keys: |
fuzzing-corpus-
- name: Build & Fuzz
run: |
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 -- -runs=1000000
# Notification job that runs after all matrix jobs complete
notification:
needs: build_and_test
runs-on: ubuntu-24.04
if: failure() # Run regardless of build_and_test outcome
steps:
- name: Slack notification on failure
run: |
curl -X POST -H 'Content-type: application/json' \
--data '{
"workflow_url": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}' \
${{ secrets.SLACK_WEBHOOK_URL }}