2018-09-16 21:58:57 +08:00
|
|
|
---
|
2018-06-24 20:41:26 +08:00
|
|
|
version: 2
|
|
|
|
|
|
|
|
workflows:
|
|
|
|
version: 2
|
2021-12-07 02:41:27 +08:00
|
|
|
program-analysis:
|
2018-06-24 20:41:26 +08:00
|
|
|
jobs:
|
2021-12-07 02:41:27 +08:00
|
|
|
# Dynamic analysis
|
2018-09-16 21:58:57 +08:00
|
|
|
- asan
|
|
|
|
- tsan
|
2022-01-13 20:31:14 +08:00
|
|
|
- msan
|
2021-12-07 02:41:27 +08:00
|
|
|
# Static analysis
|
2022-01-14 08:28:06 +08:00
|
|
|
- clang-analyze
|
2021-12-09 07:01:13 +08:00
|
|
|
- clang-tidy
|
2022-01-18 01:12:05 +08:00
|
|
|
- cpplint
|
2021-12-07 02:41:27 +08:00
|
|
|
- infer
|
2021-12-09 07:01:13 +08:00
|
|
|
- static-analysis
|
2018-06-24 20:41:26 +08:00
|
|
|
|
|
|
|
jobs:
|
2018-08-19 19:02:16 +08:00
|
|
|
asan:
|
2018-06-24 20:41:26 +08:00
|
|
|
working_directory: ~/work
|
|
|
|
docker:
|
2018-09-16 21:58:57 +08:00
|
|
|
- image: ubuntu
|
2018-06-24 20:41:26 +08:00
|
|
|
|
|
|
|
steps:
|
2018-09-16 21:58:57 +08:00
|
|
|
- run: &apt_install
|
2020-04-24 22:18:00 +08:00
|
|
|
apt-get update &&
|
|
|
|
DEBIAN_FRONTEND=noninteractive
|
|
|
|
apt-get install -y --no-install-recommends
|
2018-09-16 21:58:57 +08:00
|
|
|
clang
|
|
|
|
cmake
|
2022-01-14 08:28:06 +08:00
|
|
|
git
|
2018-09-16 21:58:57 +08:00
|
|
|
libconfig-dev
|
|
|
|
libgtest-dev
|
|
|
|
libopus-dev
|
|
|
|
libsodium-dev
|
|
|
|
libvpx-dev
|
2022-01-23 00:24:28 +08:00
|
|
|
llvm-dev
|
2018-09-16 21:58:57 +08:00
|
|
|
ninja-build
|
|
|
|
pkg-config
|
2022-01-14 08:28:06 +08:00
|
|
|
- checkout
|
2018-09-16 21:58:57 +08:00
|
|
|
- run: CC=clang .circleci/cmake-asan
|
2018-08-19 19:02:16 +08:00
|
|
|
|
|
|
|
tsan:
|
|
|
|
working_directory: ~/work
|
|
|
|
docker:
|
2018-09-16 21:58:57 +08:00
|
|
|
- image: ubuntu
|
2018-08-19 19:02:16 +08:00
|
|
|
|
|
|
|
steps:
|
2018-09-16 21:58:57 +08:00
|
|
|
- run: *apt_install
|
2022-01-14 08:28:06 +08:00
|
|
|
- checkout
|
2018-09-16 21:58:57 +08:00
|
|
|
- run: CC=clang .circleci/cmake-tsan
|
2021-12-07 02:41:27 +08:00
|
|
|
|
2022-01-13 20:31:14 +08:00
|
|
|
msan:
|
|
|
|
working_directory: ~/work
|
|
|
|
docker:
|
2022-02-01 03:32:50 +08:00
|
|
|
- image: toxchat/toktok-stack:latest-msan
|
2022-01-13 20:31:14 +08:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- run: rm -rf /src/workspace/c-toxcore/* && mv * /src/workspace/c-toxcore/
|
|
|
|
# TODO(iphydf): Remove "|| true" once this works.
|
|
|
|
- run: cd /src/workspace && bazel test //c-toxcore/auto_tests:lossless_packet_test || true
|
|
|
|
|
2021-12-07 02:41:27 +08:00
|
|
|
infer:
|
|
|
|
working_directory: ~/work
|
|
|
|
docker:
|
|
|
|
- image: toxchat/infer
|
|
|
|
|
|
|
|
steps:
|
2022-01-14 08:28:06 +08:00
|
|
|
- run: *apt_install
|
2021-12-07 02:41:27 +08:00
|
|
|
- checkout
|
2022-01-14 08:28:06 +08:00
|
|
|
- run: infer --no-progress-bar -- cc
|
2022-01-26 03:25:36 +08:00
|
|
|
auto_tests/auto_test_support.c
|
2022-01-14 08:28:06 +08:00
|
|
|
auto_tests/lossless_packet_test.c
|
|
|
|
testing/misc_tools.c
|
|
|
|
toxav/*.c
|
|
|
|
toxcore/*.c
|
|
|
|
toxencryptsave/*.c
|
|
|
|
-lpthread
|
|
|
|
$(pkg-config --cflags --libs libsodium opus vpx)
|
2021-12-07 02:41:27 +08:00
|
|
|
|
|
|
|
static-analysis:
|
|
|
|
working_directory: ~/work
|
|
|
|
docker:
|
|
|
|
- image: ubuntu
|
|
|
|
|
|
|
|
steps:
|
2022-01-14 08:28:06 +08:00
|
|
|
- run: *apt_install
|
|
|
|
- run: apt-get install -y --no-install-recommends cppcheck g++ llvm-dev
|
2021-12-07 02:41:27 +08:00
|
|
|
- checkout
|
|
|
|
- run: other/analysis/check_logger_levels
|
|
|
|
- run: other/analysis/run-check-recursion
|
|
|
|
- run: other/analysis/run-clang
|
|
|
|
- run: other/analysis/run-cppcheck
|
|
|
|
- run: other/analysis/run-gcc
|
2021-12-09 07:01:13 +08:00
|
|
|
|
2022-01-14 08:28:06 +08:00
|
|
|
clang-analyze:
|
|
|
|
working_directory: ~/work
|
|
|
|
docker:
|
|
|
|
- image: ubuntu
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- run: *apt_install
|
|
|
|
- checkout
|
|
|
|
- run: other/analysis/run-clang-analyze
|
|
|
|
|
2021-12-09 07:01:13 +08:00
|
|
|
clang-tidy:
|
|
|
|
working_directory: ~/work
|
|
|
|
docker:
|
|
|
|
- image: ubuntu
|
|
|
|
|
|
|
|
steps:
|
2022-01-14 08:28:06 +08:00
|
|
|
- run: *apt_install
|
|
|
|
- run: apt-get install -y --no-install-recommends clang-tidy-12
|
2021-12-09 07:01:13 +08:00
|
|
|
- checkout
|
2022-01-14 08:28:06 +08:00
|
|
|
- run: cmake . -B_build -GNinja -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
|
2021-12-15 05:18:41 +08:00
|
|
|
- run:
|
|
|
|
other/analysis/run-clang-tidy ||
|
|
|
|
other/analysis/run-clang-tidy ||
|
|
|
|
other/analysis/run-clang-tidy
|
2022-01-18 01:12:05 +08:00
|
|
|
|
|
|
|
cpplint:
|
|
|
|
working_directory: ~/work
|
|
|
|
docker:
|
|
|
|
- image: ubuntu
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- run: *apt_install
|
|
|
|
- run: apt-get install -y --no-install-recommends python3-pip
|
|
|
|
- checkout
|
|
|
|
- run: pip install cpplint
|
|
|
|
- run: other/analysis/run-cpplint
|