generated from duckdb/extension-template
-
Notifications
You must be signed in to change notification settings - Fork 5
97 lines (83 loc) · 2.29 KB
/
test-fuzzer-ci-still-works.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name: test-fuzzer-ci-still-works
on:
workflow_dispatch:
pull_request:
push:
branches:
- '**'
- '!main'
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
fuzzer:
name: Fuzzer
needs:
- build-duckdb
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
fuzzer: [duckfuzz, sqlsmith, duckfuzz_functions]
data: [alltypes, tpch, 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