This repository has been archived by the owner on Aug 23, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
/
.travis.yml
66 lines (57 loc) · 1.63 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
dist: trusty
sudo: required
notifications:
email:
on_success: never
on_failure: always
language: cpp
cache: ccache
os:
- linux
compiler:
- gcc
- clang
build:
parallel: true
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-5
matrix:
include:
# Tester
- compiler: gcc
env: BUILD_TYPE=Coverage SHARED=ON TESTS=ON TARGET=coverage
before_script:
- sudo apt install -y lcov gdb
- sudo update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-5 90
# Installer and examples compiler
- compiler: clang
env: BUILD_TYPE=Release SHARED=ON EXAMPLES=ON TARGET=install
env:
global:
- TESTS=OFF
- EXAMPLES=OFF
- TARGET=ohf
- CTEST_OUTPUT_ON_FAILURE=ON
matrix:
- BUILD_TYPE=Debug SHARED=ON
- BUILD_TYPE=Debug SHARED=OFF
- BUILD_TYPE=Release SHARED=ON
- BUILD_TYPE=Release SHARED=OFF
script:
- |
if [ "$CC" == "gcc" ];
then
export LAUNCHER="-DCMAKE_CXX_COMPILER_LAUNCHER=ccache";
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 90;
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 90;
else
export LAUNCHER="";
fi
- mkdir build
- cd build
- cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_SHARED_LIBS=$SHARED -DBUILD_TESTING=$TESTS -DBUILD_EXAMPLES=$EXAMPLES $LAUNCHER
- sudo env "PATH=$PATH" cmake --build . --target $TARGET -- -j4