forked from USBGuard/usbguard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
131 lines (120 loc) · 4.15 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
env:
global:
- secure: "mAKqsfksFjBmvtjVEUiUkJ1rG7pp4dGZrTez2SRoEu+bEDh620O931SwBYyWMAdKRNGt9zrV22EASXM9ug1AHboFTOnMM17YCLw/nbioV92EIYV7O+infO9dkGpn0wDVa/jPIiJB++5xeeIF8Lgq7td6wP4jE8WMl97PL5wtEMs="
language: cpp
compiler:
- clang
- gcc
os: linux
dist: bionic
matrix:
include:
- os: linux
compiler: gcc
addons:
apt:
sources:
- sourceline: 'ppa:ubuntu-toolchain-r/test'
packages: ['g++-8', 'gcc-8']
env: COMPILER_CXX=g++-8 COMPILER_C=gcc-8
- os: linux
compiler: gcc
addons:
apt:
sources:
- sourceline: 'ppa:ubuntu-toolchain-r/test'
packages: ['g++-9', 'gcc-9']
env: COMPILER_CXX=g++-9 COMPILER_C=gcc-9
- os: linux
compiler: clang
addons:
apt:
sources:
- sourceline: 'deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-6.0 main'
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
- sourceline: 'ppa:ubuntu-toolchain-r/test'
packages: ['clang-6.0']
env: COMPILER_CXX=clang++-6.0 COMPILER_C=clang-6.0
- os: linux
compiler: gcc
env: COVERAGE=yes CONFIGURE_ARGS="--enable-coverage --disable-shared" USBGUARD_TESTS_VALGRIND=off
- os: linux
compiler: gcc
env: MAKE_ARGS="distcheck DISTCHECK_CONFIGURE_FLAGS+=--with-bundled-pegtl DISTCHECK_CONFIGURE_FLAGS+=--with-bundled-catch"
- os: linux
compiler: clang
addons:
apt:
packages: ['clang']
env: MAKE_ARGS=analyze-clang
- os: linux
compiler: gcc
addons:
apt:
sources:
- sourceline: 'ppa:ubuntu-toolchain-r/test'
packages: ['g++-8', 'gcc-8']
env: COMPILER_CXX=g++-8 COMPILER_C=gcc-8 CONFIGURE_ARGS=--enable-asan USBGUARD_TESTS_VALGRIND=off
- os: linux
compiler: gcc
env: CONFIGURE_ARGS=--enable-debug-build
- os: linux
compiler: gcc
addons:
apt:
packages: ['libgcrypt-dev']
env: CONFIGURE_ARGS=--with-crypto-library=gcrypt
- os: linux
compiler: gcc
env: CONFIGURE_ARGS=--without-ldap
before_install:
- sudo apt-get -qq update
- sudo apt-get install -y ansible
- sudo apt-get install -y libudev-dev libsodium-dev libqb-dev libcap-ng-dev libseccomp-dev
- sudo apt-get install -y libglib2.0-dev libdbus-glib-1-dev libxml2-utils libpolkit-gobject-1-dev xsltproc
- sudo apt-get install -y lcov
- sudo apt-get install -y aspell aspell-en
- sudo apt-get install -y libprotobuf-dev protobuf-compiler
- sudo apt-get install -y libldap-dev
- sudo apt-get install -y valgrind
- sudo apt-get install -y asciidoc docbook-xml
- sudo apt-get install -y umockdev libumockdev-dev
- sudo gem install coveralls-lcov
- sudo apt-get install clang
- curl -JLo /tmp/astyle.tgz --remote-header-name 'https://netcologne.dl.sourceforge.net/project/astyle/astyle/astyle%203.1/astyle_3.1_linux.tar.gz'
install:
- pushd .
- cd /tmp
- tar zxvf astyle.tgz
- cd astyle/build/gcc
- make && sudo make install
- popd
- pushd .
- cd src/Tests/LDAP/ansible
- ansible-playbook -i ./hosts -u root --connection=local playbook.yml
- popd
- pushd /tmp
- wget https://github.com/protocolbuffers/protobuf/releases/download/v3.11.3/protobuf-cpp-3.11.3.tar.gz
- tar -xzvf protobuf-cpp-3.11.3.tar.gz
- CXXB=${CXX}
- CXX=g++
- pushd protobuf-3.11.3 && ./configure && make -j$(nproc) && sudo make install && sudo ldconfig && popd
- CXX=${CXXB}
- popd
before_script:
- ./autogen.sh
- mkdir build && cd build
- echo ${COMPILER_CXX} ${COMPILER_C}
- CXX=${COMPILER_CXX} CC=${COMPILER_C} ../configure --enable-werror --disable-silent-rules --with-bundled-catch --with-bundled-pegtl --with-ldap --enable-full-test-suite $CONFIGURE_ARGS
script:
- test $TRAVIS_BRANCH != coverity_scan || exit 0
- if test -n "$MAKE_ARGS"; then make $MAKE_ARGS; else make all; VERBOSE=1 make check; fi
after_success:
- test "x$COVERAGE" = xyes -a "x$CXX" = "xg++" && lcov --compat-libtool --directory . --capture --output-file coverage.info && coveralls-lcov coverage.info
addons:
coverity_scan:
project:
name: USBGuard/usbguard
notification_email: [email protected]
build_command: make
branch_pattern: coverity_scan