-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy path.travis.yml
More file actions
81 lines (79 loc) · 2.06 KB
/
.travis.yml
File metadata and controls
81 lines (79 loc) · 2.06 KB
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
language: cpp
dist: xenial
before_script:
- mkdir build
- cd build
matrix:
include:
# Linux/GCC Compilation
- os: linux
compiler: gcc
script:
- cmake ..
- make -j
# Linux/Clang Compilation
- os: linux
compiler: clang
script:
- cmake ..
- make -j
# OSX/XCode Compilation
- os: osx
osx_image: xcode10.1
script:
- cmake ..
- make -j
# Windows/MSVC Compilation
- os: windows
env:
- MSBUILD_PATH="c:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin"
script:
- export PATH=$MSBUILD_PATH:$PATH
- cmake ..
- MSBuild.exe ALL_BUILD.vcxproj -m
# Clang-Tidy check
- os: linux
env:
- TEST="Clang Tidy"
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-xenial-7
packages:
- clang-tidy-7
script:
- cmake -DENABLE_CLANG_TIDY=ON ..
- make
- make tidy > output.txt
- |
if [[ -n $(grep "warning: " output.txt) ]] || [[ -n $(grep "error: " output.txt) ]]; then
echo "You must pass the clang tidy checks before submitting a pull request"
echo ""
grep --color -E '^|warning: |error: ' output.txt
exit -1;
else
echo -e "\033[1;32m\xE2\x9C\x93 passed:\033[0m $1";
fi
# Clang-Format check
- os: linux
env:
- TEST="Clang Format"
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-xenial-7
packages:
- clang-format-7
script:
- cmake -DENABLE_CLANG_FORMAT=ON ..
- make
- make format
- |
if [[ -n $(git diff) ]]; then
echo "You must run make format before submitting a pull request"
echo ""
git diff
exit -1
fi