⬆️ Bump the rand-crates group with 2 updates #2328
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: Fuzzing with cargo fuzz | |
| permissions: | |
| contents: read | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| fuzz_target: | |
| name: Detect fuzz target | |
| runs-on: ubuntu-latest | |
| outputs: | |
| fuzz_target: ${{ steps.fuzz_target.outputs.fuzz_target }} | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - id: fuzz_target | |
| name: Detect fuzz target | |
| run: | | |
| echo fuzz_target=$(ls fuzz/fuzz_targets | jq -Rsc 'split("\n")[0:-1] | map(select(test("\\.rs$"))) | map(sub("\\.rs$"; ""))') >> "$GITHUB_OUTPUT" | |
| fuzz: | |
| name: Run cargo fuzz | |
| runs-on: ubuntu-latest | |
| needs: fuzz_target | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| fuzz_target: ${{ fromJSON(needs.fuzz_target.outputs.fuzz_target) }} | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - id: install_rust | |
| uses: ./.github/actions/setup-rust | |
| with: | |
| channel: nightly | |
| - name: Install cargo-fuzz | |
| run: cargo install cargo-fuzz | |
| - name: Run fuzzing | |
| run: | | |
| cargo fuzz run --release ${{ matrix.fuzz_target }} -- -max_total_time=300 | |
| - name: Upload crash artifacts | |
| if: always() | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | |
| with: | |
| name: fuzz-${{ matrix.fuzz_target }}-crashes | |
| path: fuzz/artifacts | |
| if-no-files-found: ignore |