|
| 1 | +# Automatically generated by fuzz/generate-files.sh |
| 2 | +name: Fuzz |
| 3 | +on: |
| 4 | + schedule: |
| 5 | + # 5am every day UTC, this correlates to: |
| 6 | + # - 10pm PDT |
| 7 | + # - 6am CET |
| 8 | + # - 4pm AEDT |
| 9 | + - cron: '00 05 * * *' |
| 10 | +permissions: {} |
| 11 | + |
| 12 | +jobs: |
| 13 | + fuzz: |
| 14 | + if: ${{ !github.event.act }} |
| 15 | + runs-on: ubuntu-24.04 |
| 16 | + permissions: |
| 17 | + contents: read |
| 18 | + strategy: |
| 19 | + fail-fast: false |
| 20 | + matrix: |
| 21 | + fuzz_target: [ |
| 22 | + deserialize_block, |
| 23 | + deserialize_output, |
| 24 | + deserialize_pset, |
| 25 | + deserialize_transaction, |
| 26 | + ] |
| 27 | + steps: |
| 28 | + - name: Install test dependencies |
| 29 | + run: sudo apt-get update -y && sudo apt-get install -y binutils-dev libunwind8-dev libcurl4-openssl-dev libelf-dev libdw-dev cmake gcc libiberty-dev |
| 30 | + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 |
| 31 | + with: |
| 32 | + persist-credentials: false |
| 33 | + - uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 |
| 34 | + id: cache-fuzz |
| 35 | + with: |
| 36 | + path: | |
| 37 | + ~/.cargo/bin |
| 38 | + fuzz/target |
| 39 | + target |
| 40 | + key: cache-${{ matrix.target }}-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }} |
| 41 | + - uses: dtolnay/rust-toolchain@5d458579430fc14a04a08a1e7d3694f545e91ce6 # stable |
| 42 | + with: |
| 43 | + toolchain: '1.74.0' |
| 44 | + - name: fuzz |
| 45 | + run: | |
| 46 | + echo "Using RUSTFLAGS $RUSTFLAGS" |
| 47 | + cd fuzz && ./fuzz.sh "${{ matrix.fuzz_target }}" |
| 48 | + - run: echo "${{ matrix.fuzz_target }}" >executed_${{ matrix.fuzz_target }} |
| 49 | + - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 |
| 50 | + with: |
| 51 | + name: executed_${{ matrix.fuzz_target }} |
| 52 | + path: executed_${{ matrix.fuzz_target }} |
| 53 | + |
| 54 | + verify-execution: |
| 55 | + if: ${{ !github.event.act }} |
| 56 | + needs: fuzz |
| 57 | + runs-on: ubuntu-24.04 |
| 58 | + permissions: |
| 59 | + contents: read |
| 60 | + steps: |
| 61 | + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 |
| 62 | + with: |
| 63 | + persist-credentials: false |
| 64 | + - uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 |
| 65 | + - run: cargo install --locked --version 0.12.0 cargo-fuzz |
| 66 | + - name: Display structure of downloaded files |
| 67 | + run: ls -R |
| 68 | + - run: find executed_* -type f -exec cat {} + | sort > executed |
| 69 | + - run: cargo fuzz list | sort | diff - executed |
0 commit comments