Skip to content

let's get that badge #7

let's get that badge

let's get that badge #7

Workflow file for this run

name: Coverage
on:
push:
branches:
- '**'
pull_request:
branches:
- '**'
jobs:
build-test:
runs-on: ubuntu-24.04
name: ubuntu-coverage
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y ninja-build cmake clang llvm
- name: Run CMake configuration and build
run: |
cmake examples -B build -G Ninja \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++ \
-DHTTP_BUILD_FUZZERS=ON
cmake --build build --target request_parser --parallel
- name: Extract corpus
run: |
tar -zxvf examples/fuzz/seeds.tgz
- name: Run fuzzers
run: |
mkdir -p /tmp/corpus
LLVM_PROFILE_FILE="default.profraw" ./build/request_parser /tmp/corpus/ seeds/request_parser/ -max_total_time=30
- name: Generate coverage report
run: |
llvm-profdata merge -sparse default.profraw -o default.profdata
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
files: default.profdata
flags: fuzzer
name: codecov-coverage
fail_ci_if_error: true
verbose: true