Fuzz Testing #221
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Fuzz Testing | |
| on: | |
| schedule: | |
| - cron: '0 4 * * *' # Nightly 4am UTC | |
| workflow_dispatch: # Manual trigger | |
| pull_request: | |
| branches: [ '*' ] | |
| jobs: | |
| fuzz: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| # Full fuzz run (nightly/manual) - 10 minutes | |
| - name: fuzz-full | |
| fuzz_time: 600 | |
| smoke_only: false | |
| # Quick smoke test (PR) - 60 seconds | |
| - name: fuzz-smoke | |
| fuzz_time: 60 | |
| smoke_only: true | |
| steps: | |
| - name: Checkout wolfMQTT | |
| uses: actions/checkout@v4 | |
| - name: ASLR workaround | |
| run: sudo sysctl vm.mmap_rnd_bits=28 | |
| - name: Run fuzzer | |
| if: ${{ (matrix.smoke_only && github.event_name == 'pull_request') || (!matrix.smoke_only && github.event_name != 'pull_request') }} | |
| run: ./scripts/fuzz.sh ${{ matrix.fuzz_time }} | |
| - name: Upload crash artifacts | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: fuzz-crashes-${{ matrix.name }} | |
| path: | | |
| crash-* | |
| oom-* | |
| timeout-* | |
| retention-days: 30 | |
| if-no-files-found: ignore |