From 69f420cb01c46fc45356a03fdd6e8118ad4bc2a6 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sat, 18 Feb 2023 21:45:19 +0100 Subject: [PATCH] run the fuzzer in the CI for 60 seconds --- .github/workflows/CICD.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/CICD.yml b/.github/workflows/CICD.yml index 9e48eb804..bfb7bf683 100644 --- a/.github/workflows/CICD.yml +++ b/.github/workflows/CICD.yml @@ -136,6 +136,25 @@ jobs: S=$(cargo fmt -- --check) && printf "%s\n" "$S" || { printf "%s\n" "$S" ; printf "%s\n" "$S" | sed -E -n -e "s/^Diff[[:space:]]+in[[:space:]]+${PWD//\//\\/}\/(.*)[[:space:]]+at[[:space:]]+[^0-9]+([0-9]+).*$/::${fault_type} file=\1,line=\2::${fault_prefix}: \`cargo fmt\`: style violation (file:'\1', line:\2; use \`cargo fmt -- \"\1\"\`)/p" ; fault=true ; } if [ -n "${{ steps.vars.outputs.FAIL_ON_FAULT }}" ] && [ -n "$fault" ]; then exit 1 ; fi + fuzz: + name: Run the Fuzzer + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: Swatinem/rust-cache@v2 + - name: Install `rust` toolchain + run: | + rustup toolchain install nightly --no-self-update --profile minimal + rustup default nightly + - name: Install `cargo-fuzz` + run: cargo install cargo-fuzz + - name: Run the fuzzer on date for 60 seconds + shell: bash + run: | + ## Run it + cd src/uu/date + cargo +nightly fuzz run fuzz_target_1 -- -max_total_time=60 -detect_leaks=0 + style_lint: name: Style/lint runs-on: ${{ matrix.job.os }}