Skip to content

fuzz-nightly

fuzz-nightly #1200

Workflow file for this run

# Runs fuzzing nightly.
name: fuzz-nightly
on:
workflow_dispatch: # allow running workflow manually
schedule:
- cron: '0 3 * * *'
jobs:
fuzz-nightly-test:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v5
with:
go-version: '1.22'
- uses: actions/checkout@v4
- name: Install go-fuzz
working-directory: test/fuzz
run: go get -u github.com/dvyukov/go-fuzz/go-fuzz github.com/dvyukov/go-fuzz/go-fuzz-build
- name: Fuzz mempool
working-directory: test/fuzz
run: timeout -s SIGINT --preserve-status 10m make fuzz-mempool
continue-on-error: true
- name: Fuzz p2p-addrbook
working-directory: test/fuzz
run: timeout -s SIGINT --preserve-status 10m make fuzz-p2p-addrbook
continue-on-error: true
- name: Fuzz p2p-pex
working-directory: test/fuzz
run: timeout -s SIGINT --preserve-status 10m make fuzz-p2p-pex
continue-on-error: true
- name: Fuzz p2p-sc
working-directory: test/fuzz
run: timeout -s SIGINT --preserve-status 10m make fuzz-p2p-sc
continue-on-error: true
- name: Fuzz p2p-rpc-server
working-directory: test/fuzz
run: timeout -s SIGINT --preserve-status 10m make fuzz-rpc-server
continue-on-error: true
- name: Archive crashers
uses: actions/upload-artifact@v4
with:
name: crashers
path: test/fuzz/**/crashers
retention-days: 1
- name: Archive suppressions
uses: actions/upload-artifact@v4
with:
name: suppressions
path: test/fuzz/**/suppressions
retention-days: 1
- name: Set crashers count
working-directory: test/fuzz
run: echo "count=$(find . -type d -name 'crashers' | xargs -I % sh -c 'ls % | wc -l' | awk '{total += $1} END {print total}')" >> $GITHUB_OUTPUT
id: set-crashers-count
outputs:
crashers-count: ${{ steps.set-crashers-count.outputs.count }}
# fuzz-nightly-fail:
# needs: fuzz-nightly-test
# if: ${{ needs.fuzz-nightly-test.outputs.crashers-count != 0 }}
# runs-on: ubuntu-latest
# steps:
# - name: Notify Slack if any crashers
# uses: rtCamp/action-slack-notify@12e36fc18b0689399306c2e0b3e0f2978b7f1ee7
# env:
# SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
# SLACK_CHANNEL: ostracon-internal
# SLACK_USERNAME: Nightly Fuzz Tests
# SLACK_ICON_EMOJI: ':firecracker:'
# SLACK_COLOR: danger
# SLACK_MESSAGE: Crashers found in Nightly Fuzz tests
# SLACK_FOOTER: ''