Skip to content

Commit

Permalink
try to reuse external workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
hmeriann committed Aug 27, 2024
1 parent cadca1b commit 14e5c98
Showing 1 changed file with 12 additions and 75 deletions.
87 changes: 12 additions & 75 deletions .github/workflows/test-fuzzer-ci-still-works.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,88 +10,25 @@ 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: duckdb/duckdb-fuzzer-ci/.github/workflows/reusable_build.yml@reusable-workflows-for-fuzzer-ci
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
uses: duckdb/duckdb-fuzzer-ci/.github/workflows/reusable_fuzzer.yml@reusable-workflows-for-fuzzer-ci
with:
fuzzer: ${{ matrix.fuzzer }}
data: ${{ matrix.data }}
timeout-minutes: 20
dry: dry
max_queries: 10

0 comments on commit 14e5c98

Please sign in to comment.