forked from klee/klee
-
Notifications
You must be signed in to change notification settings - Fork 11
234 lines (227 loc) · 6.46 KB
/
build.yaml
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
---
name: CI
on:
pull_request:
branches: [main, utbot-main]
push:
branches: [main, utbot-main, testheheh]
workflow_dispatch:
inputs:
warnings_as_errors:
description: 'Warnings as errors'
required: true
default: 1
# Defaults for building KLEE
env:
BASE_IMAGE: ubuntu:jammy-20230126
REPOSITORY: ghcr.io/unittestbot/klee
BUILD_SUFFIX: "default"
COVERAGE: 0
DISABLE_ASSERTIONS: 0
ENABLE_DOXYGEN: 0
ENABLE_OPTIMIZED: 1
ENABLE_DEBUG: 1
ENABLE_WARNINGS_AS_ERRORS: ${{ github.event_name == 'workflow_dispatch' && inputs.warnings_as_errors || 1}}
GTEST_VERSION: 1.11.0
KLEE_RUNTIME_BUILD: "Debug+Asserts"
LLVM_VERSION: 11
MINISAT_VERSION: "master"
REQUIRES_RTTI: 0
SOLVERS: BITWUZLA:Z3:STP
STP_VERSION: 2.3.3
TCMALLOC_VERSION: 2.9.1
UCLIBC_VERSION: klee_uclibc_v1.4
USE_TCMALLOC: 1
USE_LIBCXX: 1
Z3_VERSION: 4.8.15
SQLITE_VERSION: 3400100
BITWUZLA_VERSION: 0.3.1
JSON_VERSION: v3.11.3
IMMER_VERSION: v0.8.1
jobs:
Linux:
runs-on: ubuntu-latest
strategy:
matrix:
name: [
"LLVM 16",
"LLVM 15",
"LLVM 14",
"LLVM 13",
"LLVM 12",
"LLVM 11, Doxygen",
"ASan",
"UBSan",
"MSan",
"Z3 only",
"metaSMT",
"STP master",
"Bitwuzla only",
"Latest klee-uclibc",
"Asserts disabled",
"No TCMalloc, optimised runtime",
]
include:
- name: "LLVM 16"
env:
LLVM_VERSION: 16
- name: "LLVM 15"
env:
LLVM_VERSION: 15
- name: "LLVM 14"
env:
LLVM_VERSION: 14
- name: "LLVM 13"
env:
LLVM_VERSION: 13
- name: "LLVM 12"
env:
LLVM_VERSION: 12
- name: "LLVM 11, Doxygen"
env:
LLVM_VERSION: 11
ENABLE_DOXYGEN: 1
# Sanitizer builds. Do unoptimized build otherwise the optimizer
# might remove problematic code
- name: "ASan"
env:
SANITIZER_BUILD: address
ENABLE_OPTIMIZED: 0
USE_TCMALLOC: 0
SANITIZER_LLVM_VERSION: 12
- name: "UBSan"
env:
SANITIZER_BUILD: undefined
ENABLE_OPTIMIZED: 0
USE_TCMALLOC: 0
SANITIZER_LLVM_VERSION: 12
- name: "MSan"
env:
SANITIZER_BUILD: memory
ENABLE_OPTIMIZED: 0
USE_TCMALLOC: 0
SOLVERS: STP
SANITIZER_LLVM_VERSION: 14
# Test just using Z3 only
- name: "Z3 only"
env:
SOLVERS: Z3
# Test just using metaSMT
- name: "metaSMT"
env:
METASMT_VERSION: qf_abv
SOLVERS: metaSMT
METASMT_DEFAULT: STP
REQUIRES_RTTI: 1
# Test we can build against STP master
- name: "STP master"
env:
SOLVERS: STP
STP_VERSION: master
# Test just using Bitwuzla only
- name: "Bitwuzla only"
env:
SOLVERS: BITWUZLA
# Check we can build latest klee-uclibc branch
- name: "Latest klee-uclibc"
env:
UCLIBC_VERSION: klee_0_9_29
# Check at least one build with Asserts disabled.
- name: "Asserts disabled"
env:
DISABLE_ASSERTIONS: 1
# Check without TCMALLOC and with an optimised runtime library
- name: "No TCMalloc, optimised runtime"
env:
SOLVERS: STP
USE_TCMALLOC: 0
KLEE_RUNTIME_BUILD: "Release+Debug+Asserts"
steps:
- name: Checkout KLEE source code
uses: actions/checkout@v3
with:
submodules: recursive
- name: Memory layout fix for old clang
run: |
# TODO remove this once upstream fix is available
sudo sysctl -w vm.mmap_rnd_bits=28
- name: Build KLEE
env: ${{ matrix.env }}
run: scripts/build/build.sh klee --docker --create-final-image
- name: Run tests
env: ${{ matrix.env }}
run: scripts/build/run-tests.sh --run-docker --debug
macOS:
runs-on: macos-latest
env:
LLVM_VERSION: 14
BASE: /tmp
SOLVERS: STP
UCLIBC_VERSION: 0
USE_TCMALLOC: 0
USE_LIBCXX: 0
steps:
- name: Install newer version of Bash
run: brew install bash
- name: Checkout KLEE source code
uses: actions/checkout@v4
- name: Create virtualenv for Python3 (PEP 668)
run: python3 -m venv .venv
- name: Build KLEE
run: source .venv/bin/activate && echo "$(which tabulate)" && scripts/build/build.sh klee --debug --install-system-deps
- name: Run tests
run: source .venv/bin/activate && scripts/build/run-tests.sh /tmp/klee_build* --debug
Docker:
runs-on: ubuntu-latest
steps:
- name: Checkout KLEE Code
uses: actions/checkout@v3
with:
submodules: recursive
- name: Build Docker image
run: docker build .
Coverage:
runs-on: ubuntu-latest
strategy:
matrix:
name: [
"STP",
"Z3",
"Bitwuzla",
]
include:
- name: "STP"
env:
SOLVERS: STP
- name: "Z3"
env:
SOLVERS: Z3:STP
- name: "Bitwuzla"
env:
SOLVERS: BITWUZLA:Z3
env:
ENABLE_OPTIMIZED: 0
COVERAGE: 1
steps:
- name: Checkout KLEE source code
uses: actions/checkout@v3
with:
# Codecov may run into "Issue detecting commit SHA. Please run
# actions/checkout with fetch-depth > 1 or set to 0" when uploading.
# See also https://github.com/codecov/codecov-action/issues/190
fetch-depth: 2
submodules: recursive
- name: Build KLEE
env: ${{ matrix.env }}
run: scripts/build/build.sh klee --docker --create-final-image
- name: Run tests
env: ${{ matrix.env }}
run: scripts/build/run-tests.sh --coverage --upload-coverage --run-docker --debug
clang-format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.x
- uses: pre-commit/[email protected]