Skip to content

Fuzz CI

Fuzz CI #936

Workflow file for this run

# workflow to run Fuzzing tests
name: Fuzz CI
# Controls when the action will run
on:
pull_request:
branches: master
push:
branches: master
schedule:
- cron: 0 0 * * * # run every day at UTC 00:00
workflow_dispatch: # temp manual trigger
jobs:
build-and-fuzz:
runs-on: ubuntu-latest
steps:
- name: Check Out Repo
uses: actions/checkout@v2
- name: Docker
run: docker build -t verify-c-common:fuzz . --file docker/verify-c-common-fuzz.Dockerfile
- name: Run Tests and collect coverage
run: docker run -v $(pwd):/host verify-c-common:fuzz /bin/bash -c \
"mkdir /home/usea/verify-c-common/fuzzing_coverage &&
cd build && ctest -R fuzz --output-on-failure --timeout 2000 &&
python3 /home/usea/verify-c-common/scripts/get_fuzzing_coverage.py --html-dir=/home/usea/verify-c-common/fuzzing_coverage &&
mv /home/usea/verify-c-common/data/fuzz_coverage/all_fuzz.info /host &&
cp -r /home/usea/verify-c-common/fuzzing_coverage /host/fuzzing_coverage"
- name: Upload coverage
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.VCC_CODECOV_TOKEN }}
files: ./all_fuzz.info
name: codecov-verify-c-common
fail_ci_if_error: true
verbose: true
# disable for now
# - name: Deploy
# uses: JamesIves/github-pages-deploy-action@3.7.1
# if: ${{ github.event_name == 'push' }} # only deploy when change merged into master
# with:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# BRANCH: gh-pages # The branch the action should deploy to.
# FOLDER: fuzzing_coverage # The folder the action should deploy.
# TARGET_FOLDER: fuzzing_coverage
# CLEAN: true