You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

83 lines
2.6 KiB

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