github.com/Oyster-zx/tendermint@v0.34.24-fork/.github/workflows/fuzz-nightly.yml (about)

     1  # Runs fuzzing nightly.
     2  name: fuzz-nightly
     3  on:
     4    workflow_dispatch: # allow running workflow manually
     5    schedule:
     6      - cron: '0 3 * * *'
     7  
     8  jobs:
     9    fuzz-nightly-test:
    10      runs-on: ubuntu-latest
    11      steps:
    12        - uses: actions/setup-go@v3
    13          with:
    14            go-version: '1.18'
    15  
    16        - uses: actions/checkout@v3
    17  
    18        - name: Install go-fuzz
    19          working-directory: test/fuzz
    20          run: go get -u github.com/dvyukov/go-fuzz/go-fuzz github.com/dvyukov/go-fuzz/go-fuzz-build
    21  
    22        - name: Fuzz mempool
    23          working-directory: test/fuzz
    24          run: timeout -s SIGINT --preserve-status 10m make fuzz-mempool
    25          continue-on-error: true
    26  
    27        - name: Fuzz p2p-addrbook
    28          working-directory: test/fuzz
    29          run: timeout -s SIGINT --preserve-status 10m make fuzz-p2p-addrbook
    30          continue-on-error: true
    31  
    32        - name: Fuzz p2p-pex
    33          working-directory: test/fuzz
    34          run: timeout -s SIGINT --preserve-status 10m make fuzz-p2p-pex
    35          continue-on-error: true
    36  
    37        - name: Fuzz p2p-sc
    38          working-directory: test/fuzz
    39          run: timeout -s SIGINT --preserve-status 10m make fuzz-p2p-sc
    40          continue-on-error: true
    41  
    42        - name: Fuzz p2p-rpc-server
    43          working-directory: test/fuzz
    44          run: timeout -s SIGINT --preserve-status 10m make fuzz-rpc-server
    45          continue-on-error: true
    46  
    47        - name: Archive crashers
    48          uses: actions/upload-artifact@v3
    49          with:
    50            name: crashers
    51            path: test/fuzz/**/crashers
    52            retention-days: 1
    53  
    54        - name: Archive suppressions
    55          uses: actions/upload-artifact@v3
    56          with:
    57            name: suppressions
    58            path: test/fuzz/**/suppressions
    59            retention-days: 1
    60  
    61        - name: Set crashers count
    62          working-directory: test/fuzz
    63          run: echo "::set-output name=count::$(find . -type d -name 'crashers' | xargs -I % sh -c 'ls % | wc -l' | awk '{total += $1} END {print total}')"
    64          id: set-crashers-count
    65  
    66      outputs:
    67        crashers-count: ${{ steps.set-crashers-count.outputs.count }}
    68  
    69    fuzz-nightly-fail:
    70      needs: fuzz-nightly-test
    71      if: ${{ needs.fuzz-nightly-test.outputs.crashers-count != 0 }}
    72      runs-on: ubuntu-latest
    73      steps:
    74        - name: Notify Slack if any crashers
    75          uses: rtCamp/action-slack-notify@f565a63638bd3615e76249bffab00fcb9dab90f7
    76          env:
    77            SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
    78            SLACK_CHANNEL: tendermint-internal
    79            SLACK_USERNAME: Nightly Fuzz Tests
    80            SLACK_ICON_EMOJI: ':firecracker:'
    81            SLACK_COLOR: danger
    82            SLACK_MESSAGE: Crashers found in Nightly Fuzz tests
    83            SLACK_FOOTER: ''