diff --git a/.github/workflows/test-fuzzer-ci-still-works.yml b/.github/workflows/test-fuzzer-ci-still-works.yml index 8418883..3660000 100644 --- a/.github/workflows/test-fuzzer-ci-still-works.yml +++ b/.github/workflows/test-fuzzer-ci-still-works.yml @@ -10,88 +10,31 @@ on: jobs: build-duckdb: name: Build DuckDB - runs-on: ubuntu-latest - timeout-minutes: 120 - outputs: - duckdb-hash: ${{ steps.find-hash.outputs.hash }} - env: - BUILD_ICU: 1 - BUILD_JSON: 1 - BUILD_TPCH: 1 - BUILD_TPCDS: 1 - BUILD_PARQUET: 1 - BUILD_JEMALLOC: 1 - CRASH_ON_ASSERT: 1 - GEN: ninja - - steps: - - name: Dependencies - shell: bash - run: sudo apt-get update -y -qq && sudo apt-get install -y -qq ninja-build ccache - - - uses: actions/checkout@v3 - with: - repository: duckdb/duckdb - fetch-depth: 0 - - - name: Setup Ccache - uses: hendrikmuhs/ccache-action@main - - - id: find-hash - run: echo "::set-output name=hash::$(git rev-parse HEAD)" - - - name: create build sqlsmith extension file - shell: bash - run: | - echo "duckdb_extension_load(sqlsmith - GIT_URL https://github.com/duckdb/duckdb_sqlsmith - GIT_TAG main - )" > sqlsmith.cmake - - - name: Build - shell: bash - run: | - EXTENSION_CONFIGS="sqlsmith.cmake" make debug - - - uses: actions/upload-artifact@v3 - with: - name: duckdb - path: build/debug/duckdb + uses: duckdblabs/duckdb-fuzzer-ci/.github/workflows/reusable_workflows/build_fuzzer.yml@main + with: + git_url: ${{ github.actor }} + git_tag: ${{ github.ref_name }} + timeout-minutes: 120 fuzzer: name: Fuzzer needs: - build-duckdb - runs-on: ubuntu-latest - timeout-minutes: 20 strategy: fail-fast: false matrix: fuzzer: [duckfuzz, sqlsmith, duckfuzz_functions] data: [emptyalltypes] - - steps: - - uses: actions/checkout@v3 - with: - path: duckdb_sqlsmith - fetch-depth: 0 - - - name: Download a single artifact - uses: actions/download-artifact@v3 - with: - name: duckdb - - - name: Fuzz - shell: bash - run: | - chmod +x duckdb - runtime="1 minute" - endtime=$(date -ud "$runtime" +%s) - - cd duckdb_sqlsmith - while [[ $(date -u +%s) -le $endtime ]] - do - echo "Time Now: `date +%H:%M:%S`" - python3 scripts/run_fuzzer.py --no_checks --${{ matrix.fuzzer }} --${{ matrix.data }} --shell=../duckdb --dry --max_queries=10 - done - + enable_verification: [true, false] + exclude: + - enable_verification: true + fuzzer: sqlsmith + - enable_verification: true + fuzzer: duckfuzz_functions + uses: duckdblabs/duckdb-fuzzer-ci/.github/workflows/reusable_workflows/fuzz_duckdb.yml@main + with: + fuzzer: ${{ matrix.fuzzer }} + data: ${{ matrix.data }} + timeout-minutes: 20 + max_queries: 10 + enable_verification: ${{ matrix.enable_verification }} \ No newline at end of file diff --git a/scripts/run_fuzzer.py b/scripts/run_fuzzer.py index 84bb256..0172006 100644 --- a/scripts/run_fuzzer.py +++ b/scripts/run_fuzzer.py @@ -13,7 +13,7 @@ db = None shell = None perform_checks = True -dry = False +no-git-checks = False max_queries = 1000 verification = False for param in sys.argv: @@ -39,8 +39,8 @@ seed = int(param.replace('--seed=', '')) elif param.startswith('--max_queries='): max_queries = int(param.replace('--max_queries=', '')) - elif param.startswith('--dry'): - dry = True + elif param.startswith('--no-git-checks'): + no-git-checks = param.replace('--no-git-checks=', '').lower() == 'true' if fuzzer is None: print("Unrecognized fuzzer to run, expected e.g. --sqlsmith or --duckfuzz") @@ -103,7 +103,7 @@ def run_shell_command(cmd): # first get a list of all github issues, and check if we can still reproduce them -if dry: +if no-git-checks: current_errors = [] else: current_errors = fuzzer_helper.extract_github_issues(shell, perform_checks) @@ -212,5 +212,5 @@ def run_shell_command(cmd): print(f"{error_msg}") print(f"================MARKER====================") -if not dry: +if not no-git-checks: fuzzer_helper.file_issue(cmd, error_msg, fuzzer_name, seed, git_hash)