mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
4a2cb37e4b
Also added a valgrind build to run it on every pull request. I've had to disable a few tests because valgrind makes those run infinitely slowly, consistently timing them out.
130 lines
3.0 KiB
YAML
130 lines
3.0 KiB
YAML
---
|
|
version: 2
|
|
|
|
workflows:
|
|
version: 2
|
|
program-analysis:
|
|
jobs:
|
|
# Dynamic analysis
|
|
- asan
|
|
- tsan
|
|
- msan
|
|
# Static analysis
|
|
- clang-tidy
|
|
- infer
|
|
- static-analysis
|
|
|
|
jobs:
|
|
asan:
|
|
working_directory: ~/work
|
|
docker:
|
|
- image: ubuntu
|
|
|
|
steps:
|
|
- checkout
|
|
- run: &apt_install
|
|
apt-get update &&
|
|
DEBIAN_FRONTEND=noninteractive
|
|
apt-get install -y --no-install-recommends
|
|
clang
|
|
cmake
|
|
libconfig-dev
|
|
libgtest-dev
|
|
libopus-dev
|
|
libsodium-dev
|
|
libvpx-dev
|
|
llvm-dev
|
|
ninja-build
|
|
pkg-config
|
|
- run: CC=clang .circleci/cmake-asan
|
|
|
|
tsan:
|
|
working_directory: ~/work
|
|
docker:
|
|
- image: ubuntu
|
|
|
|
steps:
|
|
- checkout
|
|
- run: *apt_install
|
|
- run: CC=clang .circleci/cmake-tsan
|
|
|
|
msan:
|
|
working_directory: ~/work
|
|
docker:
|
|
- image: toxchat/toktok-stack:0.0.31-msan
|
|
|
|
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
|
|
|
|
infer:
|
|
working_directory: ~/work
|
|
docker:
|
|
- image: toxchat/infer
|
|
|
|
steps:
|
|
- run:
|
|
apt-get update &&
|
|
DEBIAN_FRONTEND=noninteractive
|
|
apt-get install -y --no-install-recommends
|
|
git
|
|
libopus-dev
|
|
libsodium-dev
|
|
libvpx-dev
|
|
pkg-config
|
|
- checkout
|
|
- run: infer --no-progress-bar -- cc toxav/*.c toxcore/*.c $(pkg-config --cflags opus vpx)
|
|
|
|
static-analysis:
|
|
working_directory: ~/work
|
|
docker:
|
|
- image: ubuntu
|
|
|
|
steps:
|
|
- checkout
|
|
- run:
|
|
apt-get update &&
|
|
DEBIAN_FRONTEND=noninteractive
|
|
apt-get install -y --no-install-recommends
|
|
clang
|
|
cppcheck
|
|
g++
|
|
libconfig-dev
|
|
libgtest-dev
|
|
libopus-dev
|
|
libsodium-dev
|
|
libvpx-dev
|
|
llvm
|
|
- run: other/analysis/check_logger_levels
|
|
- run: other/analysis/run-check-recursion
|
|
- run: other/analysis/run-clang
|
|
- run: other/analysis/run-clang-analyze
|
|
- run: other/analysis/run-cppcheck
|
|
- run: other/analysis/run-gcc
|
|
|
|
clang-tidy:
|
|
working_directory: ~/work
|
|
docker:
|
|
- image: ubuntu
|
|
|
|
steps:
|
|
- checkout
|
|
- run:
|
|
apt-get update &&
|
|
DEBIAN_FRONTEND=noninteractive
|
|
apt-get install -y --no-install-recommends
|
|
build-essential
|
|
clang-tidy-11
|
|
cmake
|
|
libconfig-dev
|
|
libopus-dev
|
|
libsodium-dev
|
|
libvpx-dev
|
|
- run: cmake . -B_build -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
|
|
- run:
|
|
other/analysis/run-clang-tidy ||
|
|
other/analysis/run-clang-tidy ||
|
|
other/analysis/run-clang-tidy
|