Remove oss-fuzz ci, add custom fuzzing ci

This commit is contained in:
ado 2024-03-03 01:50:54 +01:00
parent 880266bf61
commit 805196a636
3 changed files with 33 additions and 35 deletions

View File

@ -1,4 +1,4 @@
name: coverage-ci
name: fuzz-ci
on:
workflow_dispatch:
@ -18,39 +18,40 @@ on:
- bugfix/**
jobs:
fuzzing:
clang_tests:
if: >-
! contains(toJSON(github.event.commits.*.message), '[skip ci]') &&
! contains(toJSON(github.event.commits.*.message), '[skip github]')
runs-on: ubuntu-latest
name: "Fuzzing"
container:
image: silkeh/clang:15
options: -v /usr/local:/host_usr_local
env:
CC: clang
CXX: clang++
CXXFLAGS: -stdlib=libc++
steps:
- name: Build Fuzzers
id: build
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
with:
oss-fuzz-project-name: 'ssp'
language: c++
- uses: actions/checkout@v1
- name: Run Fuzzers
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
with:
oss-fuzz-project-name: 'ssp'
language: c++
fuzz-seconds: 60
output-sarif: true
- uses: friendlyanon/fetch-core-count@v1
id: cores
- name: Upload Crash
uses: actions/upload-artifact@v3
if: failure() && steps.build.outcome == 'success'
with:
name: artifacts
path: ./out/artifacts
- name: Install dependencies
run: |
apt-get update
apt-get install -y git
script/ci_install_deps.sh
- name: Upload Sarif
if: always() && steps.build.outcome == 'success'
uses: github/codeql-action/upload-sarif@v2
with:
# Path to SARIF file relative to the root of the repository
sarif_file: cifuzz-sarif/results.sarif
checkout_path: cifuzz-sarif
category: CIFuzz
- name: Build
working-directory: fuzz
run: make
- name: Run
working-directory: fuzz
run: ssp_fuz -max_total_time=30

View File

@ -1,5 +0,0 @@
#!/usr/bin/env sh
$CXX $CFLAGS $CXXFLAGS $LIB_FUZZING_ENGINE $SRC/fuzz/ssp_fuzz.cpp
-I $SRC/include
-o $OUT/ssp_fuzz

2
fuzz/makefile Normal file
View File

@ -0,0 +1,2 @@
all:
clang++ -std=c++17 -o ssp_fuzz ssp_fuzz.cpp -g -fsanitize=fuzzer