forked from hyperlight-dev/hyperlight
-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (51 loc) · 1.67 KB
/
dep_fuzzing.yml
File metadata and controls
59 lines (51 loc) · 1.67 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
name: Fuzzing Job
on:
workflow_call:
inputs:
max_total_time:
description: Maximum total time for the fuzz run in seconds
required: true
type: number
targets:
description: Fuzz targets to run
required: true
type: string
docs_only:
description: Skip fuzzing if docs only
required: false
type: string
default: "false"
permissions:
contents: read
jobs:
fuzz:
if: ${{ inputs.docs_only == 'false' }}
runs-on: [ self-hosted, Linux, X64, "1ES.Pool=hld-kvm-amd", "JobId=fuzz-${{ matrix.target }}-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}" ]
strategy:
matrix:
target: ${{ fromJson(inputs.targets) }}
steps:
- name: Checkout code
uses: actions/checkout@v6
- uses: hyperlight-dev/[email protected]
with:
rust-toolchain: "1.89"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Download Rust guests
uses: actions/download-artifact@v8
with:
name: rust-guests-release
path: src/tests/rust_guests/bin/release/
- name: Install cargo-fuzz
run: command -v cargo-fuzz >/dev/null 2>&1 || cargo install cargo-fuzz
- name: Run Fuzzing
run: just fuzz-timed ${{ matrix.target }} ${{ inputs.max_total_time }}
working-directory: src/hyperlight_host
- name: Upload Crash Artifacts
if: failure() # This ensures artifacts are only uploaded on failure
uses: actions/upload-artifact@v7
with:
name: fuzz-crash-artifacts
path: fuzz/artifacts/
retention-days: 28