[pull] main from ParkMyCar:main #124
This file contains 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
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
paths: | |
- 'compact_str/**' | |
- 'fuzz/**' | |
- '.github/workflows/fuzz.yml' | |
- '!CHANGELOG.md' | |
- '!**/README.md' | |
workflow_dispatch: | |
# schedule: | |
# - cron: '0 01,13 * * *' | |
name: Fuzz | |
env: | |
CARGO_TERM_COLOR: "always" | |
RUSTFLAGS: "-D warnings -Zrandomize-layout" | |
jobs: | |
libFuzzer_x86_64: | |
name: libFuzzer [x86_64] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
name: Checkout compact_str | |
- name: Install toolchain | |
run: | | |
rustup toolchain install nightly-2024-06-01 --no-self-update --profile minimal | |
rustup override set nightly-2024-06-01 | |
- name: Install cargo-fuzz | |
uses: taiki-e/install-action@v2 | |
with: | |
tool: cargo-fuzz | |
- uses: Swatinem/rust-cache@v2 | |
- name: Set Fuzz Time | |
run: | | |
if [[ "${{github.event_name}}" == "push" || "${{github.event_name}}" == "pull_request" ]]; then | |
echo "fuzz_time=120" >> $GITHUB_ENV | |
else | |
echo "fuzz_time=1800" >> $GITHUB_ENV | |
fi | |
echo "${{ env.fuzz_time }}" | |
- name: Fuzz! | |
run: cargo fuzz run --features=libfuzzer-sys --debug-assertions compact_str -- -max_total_time=${{ env.fuzz_time }} | |
# - name: File Issue (if failure found) | |
# if: failure() | |
# uses: JasonEtco/[email protected] | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# with: | |
# update_existing: true |