Skip to content

Commit

Permalink
Remove oss-fuzz ci, add custom fuzzing ci
Browse files Browse the repository at this point in the history
  • Loading branch information
red0124 committed Mar 3, 2024
1 parent 880266b commit 805196a
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 38 deletions.
67 changes: 34 additions & 33 deletions .github/workflows/fuzz.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: coverage-ci
name: fuzz-ci

on:
workflow_dispatch:
Expand All @@ -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++

- 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

- name: Upload Crash
uses: actions/upload-artifact@v3
if: failure() && steps.build.outcome == 'success'
with:
name: artifacts
path: ./out/artifacts

- 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
- uses: actions/checkout@v1

- uses: friendlyanon/fetch-core-count@v1
id: cores

- name: Install dependencies
run: |
apt-get update
apt-get install -y git
script/ci_install_deps.sh
- name: Build
working-directory: fuzz
run: make

- name: Run
working-directory: fuzz
run: ssp_fuz -max_total_time=30
5 changes: 0 additions & 5 deletions fuzz/build.sh

This file was deleted.

2 changes: 2 additions & 0 deletions fuzz/makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
all:
clang++ -std=c++17 -o ssp_fuzz ssp_fuzz.cpp -g -fsanitize=fuzzer

0 comments on commit 805196a

Please sign in to comment.