-
Notifications
You must be signed in to change notification settings - Fork 3
101 lines (93 loc) · 5.91 KB
/
fuzz.yml
File metadata and controls
101 lines (93 loc) · 5.91 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# ------------------------------------------------------------------------------
# Copyright Matt Borland 2025.
# Copyright Christopher Kormanyos 2025.
# Distributed under the Boost Software License,
# Version 1.0. (See accompanying file LICENSE_1_0.txt
# or copy at http://www.boost.org/LICENSE_1_0.txt)
# ------------------------------------------------------------------------------
name: fuzz
on:
push:
branches:
- master
- develop
- feature/**
pull_request:
types: [opened, synchronize, reopened]
jobs:
clang-fuzzing-versus-wide-integer:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
compiler: [ clang++ ]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: '0'
- name: update-tools
run: sudo apt install llvm lld
- name: clone-wide-integer
working-directory: ${{runner.workspace}}
run: |
git clone -b master --depth 1 https://github.com/ckormanyos/wide-integer.git ${{runner.workspace}}/wide-integer
- name: clang-fuzzing-versus-wide-integer
run: |
${{ matrix.compiler }} -v
echo 'compiling test/fuzzing/test_fuzzing_div_versus_wide_int.cpp'
${{ matrix.compiler }} -std=c++20 -g -O2 -Wall -Wextra -Wpedantic -Wconversion -Wsign-conversion -fsanitize=fuzzer -I./include -I${{runner.workspace}}/wide-integer test/fuzzing/test_fuzzing_div_versus_wide_int.cpp -o test_fuzzing_div_versus_wide_int
echo "run test_fuzzing_div_versus_wide_int"
./test_fuzzing_div_versus_wide_int -max_total_time=600 -max_len=32 -verbosity=0 -close_fd_mask=3
echo 'compiling test/fuzzing/test_fuzzing_add_versus_wide_int.cpp'
${{ matrix.compiler }} -std=c++20 -g -O2 -Wall -Wextra -Wpedantic -Wconversion -Wsign-conversion -fsanitize=fuzzer -I./include -I${{runner.workspace}}/wide-integer test/fuzzing/test_fuzzing_add_versus_wide_int.cpp -o test_fuzzing_add_versus_wide_int
echo "run test_fuzzing_add_versus_wide_int"
./test_fuzzing_add_versus_wide_int -max_total_time=300 -max_len=32 -verbosity=0 -close_fd_mask=3
echo 'compiling test/fuzzing/test_fuzzing_sub_versus_wide_int.cpp'
${{ matrix.compiler }} -std=c++20 -g -O2 -Wall -Wextra -Wpedantic -Wconversion -Wsign-conversion -fsanitize=fuzzer -I./include -I${{runner.workspace}}/wide-integer test/fuzzing/test_fuzzing_sub_versus_wide_int.cpp -o test_fuzzing_sub_versus_wide_int
echo "run test_fuzzing_sub_versus_wide_int"
./test_fuzzing_sub_versus_wide_int -max_total_time=300 -max_len=32 -verbosity=0 -close_fd_mask=3
echo 'compiling test/fuzzing/test_fuzzing_mul_versus_wide_int.cpp'
${{ matrix.compiler }} -std=c++20 -g -O2 -Wall -Wextra -Wpedantic -Wconversion -Wsign-conversion -fsanitize=fuzzer -I./include -I${{runner.workspace}}/wide-integer test/fuzzing/test_fuzzing_mul_versus_wide_int.cpp -o test_fuzzing_mul_versus_wide_int
echo "run test_fuzzing_mul_versus_wide_int"
./test_fuzzing_mul_versus_wide_int -max_total_time=300 -max_len=32 -verbosity=0 -close_fd_mask=3
clang-fuzzing-versus-wide-integer-no-builtin:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
compiler: [ clang++ ]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: '0'
- name: update-tools
run: sudo apt install llvm lld
- name: clone-wide-integer
working-directory: ${{runner.workspace}}
run: |
git clone -b master --depth 1 https://github.com/ckormanyos/wide-integer.git ${{runner.workspace}}/wide-integer
- name: clang-fuzzing-versus-wide-integer
run: |
${{ matrix.compiler }} -v
echo 'compiling test/fuzzing/test_fuzzing_div_versus_wide_int.cpp'
${{ matrix.compiler }} -std=c++20 -g -O2 -Wall -Wextra -Wpedantic -Wconversion -Wsign-conversion -fsanitize=fuzzer -I./include -I${{runner.workspace}}/wide-integer -DBOOST_INT128_NO_BUILTIN_INT128=1 test/fuzzing/test_fuzzing_div_versus_wide_int.cpp -o test_fuzzing_div_versus_wide_int
echo "run test_fuzzing_div_versus_wide_int"
./test_fuzzing_div_versus_wide_int -max_total_time=600 -max_len=32 -verbosity=0 -close_fd_mask=3
echo 'compiling test/fuzzing/test_fuzzing_add_versus_wide_int.cpp'
${{ matrix.compiler }} -std=c++20 -g -O2 -Wall -Wextra -Wpedantic -Wconversion -Wsign-conversion -fsanitize=fuzzer -I./include -I${{runner.workspace}}/wide-integer -DBOOST_INT128_NO_BUILTIN_INT128=1 test/fuzzing/test_fuzzing_add_versus_wide_int.cpp -o test_fuzzing_add_versus_wide_int
echo "run test_fuzzing_add_versus_wide_int"
./test_fuzzing_add_versus_wide_int -max_total_time=300 -max_len=32 -verbosity=0 -close_fd_mask=3
echo 'compiling test/fuzzing/test_fuzzing_sub_versus_wide_int.cpp'
${{ matrix.compiler }} -std=c++20 -g -O2 -Wall -Wextra -Wpedantic -Wconversion -Wsign-conversion -fsanitize=fuzzer -I./include -I${{runner.workspace}}/wide-integer -DBOOST_INT128_NO_BUILTIN_INT128=1 test/fuzzing/test_fuzzing_sub_versus_wide_int.cpp -o test_fuzzing_sub_versus_wide_int
echo "run test_fuzzing_sub_versus_wide_int"
./test_fuzzing_sub_versus_wide_int -max_total_time=300 -max_len=32 -verbosity=0 -close_fd_mask=3
echo 'compiling test/fuzzing/test_fuzzing_mul_versus_wide_int.cpp'
${{ matrix.compiler }} -std=c++20 -g -O2 -Wall -Wextra -Wpedantic -Wconversion -Wsign-conversion -fsanitize=fuzzer -I./include -I${{runner.workspace}}/wide-integer -DBOOST_INT128_NO_BUILTIN_INT128=1 test/fuzzing/test_fuzzing_mul_versus_wide_int.cpp -o test_fuzzing_mul_versus_wide_int
echo "run test_fuzzing_mul_versus_wide_int"
./test_fuzzing_mul_versus_wide_int -max_total_time=300 -max_len=32 -verbosity=0 -close_fd_mask=3