-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
68 lines (60 loc) · 2.33 KB
/
.travis.yml
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
os: linux
dist: focal
language: c
install:
- pip install cpplint
addons:
apt:
packages:
- valgrind
- lcov
- cppcheck
jobs:
include:
- stage: UnitTests
name: "Unit-tests"
script:
- cmake -B build -DCMAKE_BUILD_TYPE=$BUILD -DWITH_TESTS=ON
- make -C build
- cd build/lib/test/
- ./u_test_dynamic
- ./u_test_static
- stage: TestCoverage
name: "Test coverage dynamic library"
script:
- cmake -B build -DCMAKE_BUILD_TYPE=$BUILD -DWITH_COVERAGE=1
- make -C build
- cd build/lib/test/
- ./u_test_dynamic
- cd CMakeFiles/u_test_dynamic.dir/src
- gcov unit_tests_parallel.cpp.gcno
- lcov --capture --directory ../../ --output-file unit_tests.info
- genhtml -o ../../../../../../coverage-report unit_tests.info
- stage: Sanitaize
name: "Tests for libraries with sanitaize"
script:
- cmake -B build -DCMAKE_BUILD_TYPE=$BUILD -DWITH_SANITIZERS=1
- make -C build
- cd build/lib/test/
- ./u_test_dynamic
- ./u_test_static
- touch result.txt
- ./stress_test_d ../../../files/100mb.txt 3 announced disapperared discreetly
- ./stress_test_s ../../../files/100mb.txt 3 announced disapperared discreetly
- ./stress_test_controller
- stage: Memcheck
name: "Memory check"
script:
- cmake -B build -DCMAKE_BUILD_TYPE=$BUILD -DWITH_TESTS=ON
- make -C build
- cd build/lib/test/
- valgrind --leak-check=full --leak-resolution=med --track-origins=yes --vgdb=no ./u_test_dynamic
- valgrind --leak-check=full --leak-resolution=med --track-origins=yes --vgdb=no ./u_test_static
- touch result.txt
- valgrind --leak-check=full --leak-resolution=med --track-origins=yes --vgdb=no ./stress_test_s ../../../files/100mb.txt 3 announced disapperared discreetly
- valgrind --leak-check=full --leak-resolution=med --track-origins=yes --vgdb=no ./stress_test_d ../../../files/100mb.txt 3 announced disapperared discreetly
- valgrind --leak-check=full --leak-resolution=med --track-origins=yes --vgdb=no ./stress_test_controller
- stage: StaticAnalysis
name: "Static analysis"
script:
- cppcheck --enable=all --error-exitcode=1 --inconclusive lib/* src/*