-
Notifications
You must be signed in to change notification settings - Fork 3
/
.travis.yml
65 lines (59 loc) · 1.44 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
language: C
sudo: false
matrix:
include:
- os: linux
compiler: gcc
env:
- BUILD_TYPE=Debug
- COVERAGE=ON
before_script:
- pip install --user cpp-coveralls
after_success:
- coveralls --build-root build --include src --include tests --gcov-options '\-lp'
- os: linux
compiler: gcc
env:
- BUILD_TYPE=Release
- os: linux
compiler: clang
env:
- BUILD_TYPE=Debug
- os: linux
compiler: clang
env:
- BUILD_TYPE=Release
script:
# Print general inforamtion
- printenv
- cmake --version
- cmake --help
# Basic build
- cd build
- cmake .. -DCERAII_TEST_BUILD=ON -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DCMAKE_C_FLAGS="-Wall -Wextra -Werror"
- cmake --build . --target all
- ls
- ./test_basic
- ./test_multithread
# Build with sanitizers
- cd ..
- rm -r build/*
- cd build
- cmake .. -DCERAII_TEST_BUILD=OFF -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DCMAKE_C_FLAGS="-Wall -Wextra -Werror"
- cmake --build . --target all
- ls
- ./test_basic
- ./test_multithread
# Check code coverage
- if [ ${COVERAGE} == 'ON' ];
then
cd .. ;
rm -r build/* ;
cd build ;
cmake .. -DCERAII_COVERALLS_BUILD=ON -DCERAII_TEST_BUILD=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS="-Wall -Wextra -Werror" ;
cmake --build . --target all ;
ls ;
./test_basic ;
./test_multithread ;
fi
- cd ..