forked from uncrustify/uncrustify
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
92 lines (83 loc) · 2.64 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
dist: trusty
language: cpp
sudo: false
matrix:
include:
- env: BUILD_TYPE=debug
- env: BUILD_TYPE=release
- env: BUILD_TYPE=release NO_MACRO_VARARG=1
# GCC 6
- env: C_COMPILER=gcc-6 CXX_COMPILER=g++-6
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-6
- g++-6
# Clang 3.8 address sanitizer
- env: BUILD_TYPE=asan C_COMPILER=clang-3.8 CXX_COMPILER=clang++-3.8
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.8
packages:
- clang-3.8
# mingw-w64 Win64 cross-compile
- env: BUILD_TYPE=cross C_COMPILER=x86_64-w64-mingw32-gcc CXX_COMPILER=x86_64-w64-mingw32-g++
addons:
apt:
packages:
- mingw-w64
- binutils-mingw-w64
- binutils-mingw-w64-i686
- binutils-mingw-w64-x86-64
- gcc-mingw-w64
- gcc-mingw-w64-i686
- gcc-mingw-w64-x86-64
- g++-mingw-w64
- g++-mingw-w64-i686
- g++-mingw-w64-x86-64
branches:
only:
- master
before_install:
- if [ -n "${C_COMPILER}" ]; then export CC="${C_COMPILER}"; fi
- if [ -n "${CXX_COMPILER}" ]; then export CXX="${CXX_COMPILER}"; fi
- ${CXX} --version
- cmake --version
- mkdir build
- cd build
before_script:
# to stop the script after an error/warning
- set -e
- |-
case "${BUILD_TYPE}" in
"coverage")
cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_COVERAGE=ON ..
;;
"asan")
cmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_SANITIZER=address ..
;;
"ubsan")
cmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_SANITIZER=undefined ..
;;
"cross")
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-mingw64.cmake -DCMAKE_EXE_LINKER_FLAGS="-static -s" ..
;;
"release")
cmake -DCMAKE_BUILD_TYPE=Release ..
;;
*)
cmake ..
;;
esac
script:
- make VERBOSE=1
- if [ "x${BUILD_TYPE}" != "xcross" ]; then ctest -V; fi
# test if all the sources are conform to the forUncrustifySources.cfg config file
- if [ "x${BUILD_TYPE}" == "xrelease" ]; then cd ../; ./scripts/Run_uncrustify_for_sources.sh; fi
# test if uncrustify runs for (some) command line options
- if [ "x${BUILD_TYPE}" == "xrelease" ]; then ./tests/cli/test_cli_options.sh; fi
# - /home/travis/build/uncrustify/uncrustify/build/uncrustify -c /home/travis/build/uncrustify/uncrustify/tests/config/mono.cfg -f /home/travis/build/uncrustify/uncrustify/tests/input/cs/simple.cs -L A