forked from duckdb/duckdb
-
Notifications
You must be signed in to change notification settings - Fork 0
129 lines (112 loc) · 3.31 KB
/
cifuzz.yml
File metadata and controls
129 lines (112 loc) · 3.31 KB
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
name: CIFuzz
on:
push:
paths-ignore:
- '**.md'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || '' }}-${{ github.base_ref || '' }}-${{ github.ref != 'refs/heads/master' || github.sha }}
cancel-in-progress: true
jobs:
Fuzzing:
name: OSSFuzz
if: github.repository == 'duckdb/duckdb'
runs-on: ubuntu-latest
steps:
- name: Build Fuzzers
id: build
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
with:
oss-fuzz-project-name: 'duckdb'
dry-run: false
- name: Run Fuzzers
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
with:
oss-fuzz-project-name: 'duckdb'
fuzz-seconds: 600
dry-run: false
- name: Upload Crash
uses: actions/upload-artifact@v1
if: failure() && steps.build.outcome == 'success'
with:
name: artifacts
path: ./out/artifacts
sqlsmith-fuzzing:
name: SQLSmith Fuzzing
if: github.repository == 'duckdb/duckdb'
runs-on: ubuntu-latest
env:
BUILD_SQLSMITH: 1
BUILD_TPCH: 1
BUILD_TPCDS: 1
BUILD_PARQUET: 1
GEN: ninja
FUZZEROFDUCKSKEY: ${{ secrets.FUZZEROFDUCKSKEY }}
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:
fetch-depth: 0
- name: Build
shell: bash
run: |
make debug
- name: Fuzz
shell: bash
run: |
python3 scripts/run_fuzzer.py --sqlsmith --alltypes --shell=build/debug/duckdb
sqlancer-fuzzing:
name: SQLancer Fuzzing
if: github.repository == 'duckdb/duckdb'
runs-on: ubuntu-latest
env:
BUILD_SQLSMITH: 1
BUILD_JDBC: 1
GEN: ninja
FUZZEROFDUCKSKEY: ${{ secrets.FUZZEROFDUCKSKEY }}
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:
fetch-depth: 0
- uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Build SQLancer
shell: bash
run: |
git clone https://github.com/Mytherin/sqlancer
cd sqlancer
mvn package -q -DskipTests
cd ..
- name: Setup Ccache
uses: hendrikmuhs/ccache-action@main
with:
key: ${{ github.job }}
- name: Build JDBC Driver
shell: bash
run: |
mkdir -p build/jdbcdebug
cd build/jdbcdebug
cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Debug -DJDBC_DRIVER=1 -DBUILD_UNITTESTS=FALSE -DENABLE_SANITIZER=FALSE ../..
cmake --build .
cd ../..
cp build/jdbcdebug/tools/jdbc/duckdb_jdbc.jar ./sqlancer/target/lib/duckdb_jdbc-*.jar
- name: Build Shell
shell: bash
run: |
make debug
- name: Build Python Client
shell: bash
run: |
pip install requests numpy
cd tools/pythonpkg
python3 setup.py install --user
cd ../..
- name: Fuzz
shell: bash
run: |
python3 scripts/run_sqlancer.py --sqlancer=`pwd`/sqlancer --shell=build/debug/duckdb