-
Notifications
You must be signed in to change notification settings - Fork 12
81 lines (69 loc) · 2.37 KB
/
fuzz.yml
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
75
76
77
78
79
80
81
name: FUZZING CODE
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
fuzzing_test:
strategy:
matrix:
fuzz_hash_transcript_data_feature: [true, false]
fuzz_mut_auth_feature: [true, false]
runs-on: ubuntu-22.04
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: install NASM
uses: ilammy/setup-nasm@13cbeb366c45c4379d3478cdcbadd8295feb5028 # v1.5.1
- name: Install LLVM and Clang
uses: KyleMayes/install-llvm-action@e0a8dc9cb8a22e8a7696e8a91a4e9581bec13181 # v2.0.5
with:
version: "14.0"
directory: ${{ runner.temp }}/llvm
- name: Checkout sources
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: recursive
- name: Install toolchain
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1.0.7
with:
profile: minimal
toolchain: nightly-2023-12-31
override: true
components: rust-src, rustfmt, clippy, llvm-tools-preview
- name: Checkout sources
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: recursive
- name: Check code
run: |
./sh_script/build.sh -c
- name: Install AFL (Linux)
uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # v1.0.3
with:
command: install
args: --force --version 0.12.17 afl
if: runner.os == 'Linux'
- name: Install Cargo-Fuzz (Linux)
uses: actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # v1.0.3
with:
command: install
args: cargo-fuzz
if: runner.os == 'Linux'
- name: set core_pattern for core
run: |
sudo su - root <<EOF
echo core >/proc/sys/kernel/core_pattern
pushd /sys/devices/system/cpu
echo performance | tee cpu*/cpufreq/scaling_governor
popd
exit
EOF
if: runner.os == 'Linux'
- name: Run fuzz
env:
FUZZ_HASH_TRANSCRIPT_DATA_FEATURE: ${{ matrix.fuzz_hash_transcript_data_feature }}
FUZZ_MUT_AUTH_FEATURE: ${{ matrix.fuzz_mut_auth_feature }}
run: |
./sh_script/fuzz_run.sh