@@ -12,21 +12,45 @@ permissions:
1212
1313jobs :
1414 fuzzing :
15- uses : ./.github/workflows/dep_fuzzing.yml
16- with :
17- targets : ' ["fuzz_host_print", "fuzz_guest_call", "fuzz_host_call"]' # Pass as a JSON array
18- max_total_time : 18000 # 5 hours in seconds
19- secrets : inherit
20-
21- notify-failure :
22- runs-on : ubuntu-latest
23- needs : fuzzing
24- if : failure() && needs.fuzzing.result == 'failure'
15+ runs-on : [ self-hosted, Linux, X64, "1ES.Pool=hld-kvm-amd" ]
16+ strategy :
17+ matrix :
18+ target : ["fuzz_host_print", "fuzz_guest_call", "fuzz_host_call"]
2519 steps :
2620 - name : Checkout code
2721 uses : actions/checkout@v5
28-
22+
23+ -
uses :
hyperlight-dev/[email protected] 24+ with :
25+ rust-toolchain : " 1.86"
26+ env :
27+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
28+
29+ - name : Set up nightly rust
30+ uses : dtolnay/rust-toolchain@nightly
31+
32+ - name : Build rust binaries
33+ run : |
34+ # use these commands in favor of build-and-move-rust-guests to avoid building debug
35+ just build-rust-guests release
36+ just move-rust-guests release
37+
38+ - name : Install cargo-fuzz
39+ run : cargo install cargo-fuzz
40+
41+ - name : Run Fuzzing
42+ run : just fuzz-timed ${{ matrix.target }} 18000 # 5 hours in seconds
43+ working-directory : src/hyperlight_host
44+
45+ - name : Upload Crash Artifacts
46+ if : failure() # This ensures artifacts are only uploaded on failure
47+ uses : actions/upload-artifact@v4
48+ with :
49+ name : fuzz-crash-artifacts
50+ path : fuzz/artifacts/
51+
2952 - name : Notify Fuzzing Failure
53+ if : failure()
3054 run : ./dev/notify-fuzzing-failure.sh "fuzz_host_print,fuzz_guest_call,fuzz_host_call"
3155 env :
3256 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments