11version : 2.1
22
3+ main_branch_only : &main_branch_only
4+ requires :
5+ - build-bazel
6+ - build-and-test-cmake
7+ - build-and-test-windows-bazel
8+ - build-and-test-windows-cmake
9+ filters :
10+ branches :
11+ only :
12+ - main
13+
314orbs :
415 codecov :
codecov/[email protected] 516
@@ -13,6 +24,27 @@ executors:
1324 - image : " datadog/docker-library:dd-trace-cpp-ci"
1425 resource_class : arm.xlarge
1526
27+ commands :
28+ run_timeout :
29+ description : " Run a command for a specified duration"
30+ parameters :
31+ command :
32+ type : string
33+ duration :
34+ type : string
35+ description :
36+ type : string
37+ steps :
38+ - run :
39+ name : << parameters.description >>
40+ command : |
41+ set +e
42+ timeout << parameters.duration >> << parameters.command >>
43+ # `124` is the exit code timeout returns when the duration is reached
44+ if [[ $? -eq 124 ]]; then
45+ exit 0
46+ fi
47+
1648jobs :
1749 format :
1850 docker :
@@ -171,6 +203,25 @@ jobs:
171203 - store_artifacts :
172204 path : logs_cpp_parametric_dev.tar.gz
173205
206+ fuzz-testing :
207+ docker :
208+ - image : " datadog/docker-library:dd-trace-cpp-ci"
209+ resource_class : xlarge
210+ environment :
211+ MAKE_JOB_COUNT : 8
212+ steps :
213+ - checkout
214+ - run : bin/with-toolchain llvm cmake . -B .build -DCMAKE_BUILD_TYPE=Debug -DDD_TRACE_BUILD_FUZZERS=1 -DDD_TRACE_ENABLE_SANITIZE=1
215+ - run : cmake --build .build -j ${MAKE_JOB_COUNT} --target dd_trace_cpp-fuzzers
216+ - run_timeout :
217+ description : Run W3C propagation fuzzer
218+ command : ./.build/fuzz/w3c-propagation/w3c-propagation-fuzz
219+ duration : 5m
220+ - run_timeout :
221+ description : Run Base64 fuzzer
222+ command : timeout 5m ./.build/fuzz/base64/base64-fuzz
223+ duration : 5m
224+
174225workflows :
175226 pull-request :
176227 jobs :
@@ -199,12 +250,6 @@ workflows:
199250 requires :
200251 - build-and-test-cmake
201252 - system-tests :
202- requires :
203- - build-bazel
204- - build-and-test-cmake
205- - build-and-test-windows-bazel
206- - build-and-test-windows-cmake
207- filters :
208- branches :
209- only :
210- - main
253+ << : *main_branch_only
254+ - fuzz-testing :
255+ << : *main_branch_only
0 commit comments