-
Notifications
You must be signed in to change notification settings - Fork 3
/
.travis.yml
66 lines (54 loc) · 2.18 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
language: cpp
dist: trusty
osx_image: xcode7.3
sudo: required
cache: ccache
# Travis CI VM OSs -> 2 OSs
os:
- linux
- osx
# Travis CI build matrix components -> 2 compilers
compiler:
- gcc
- clang
# Travis CI environmental variables -> 2 env variables
env:
- TRAVIS_BUILD_TYPE=Debug
- TRAVIS_BUILD_TYPE=Release
# Total builds: 8 = 2 [OSs] * 2 [comps] * 2 [env vars]
before_install:
# Update package managers
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get -qq update; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew update; fi
# Use ccache also for clang and clang++ on linux
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then if [ "$CC" == "clang" ]; then sudo ln -s ../../bin/ccache /usr/lib/ccache/clang; fi; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then if [ "$CC" == "clang" ]; then export CFLAGS="-Qunused-arguments"; fi; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then if [ "$CXX" == "clang++" ]; then sudo ln -s ../../bin/ccache /usr/lib/ccache/clang++; fi; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then if [ "$CXX" == "clang++" ]; then export CXXFLAGS="-Qunused-arguments"; fi; fi
# Install ccache on osx
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew install ccache; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then export PATH="/usr/local/opt/ccache/libexec:$PATH"; fi
# Print some more system information after installing all build tools
- echo "-------------------- BEGIN SYSTEM INFORMATION --------------------"
- uname -a
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then lsb_release -a; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then system_profiler SPSoftwareDataType; fi
- env
- which cmake
- cmake --version
- which $CC
- $CC --version
- which $CXX
- $CXX --version
- which ccache
- ccache --version
- ccache -s
- echo "-------------------- END SYSTEM INFORMATION --------------------"
before_script:
# Run CMake
- mkdir build
- cd build
- cmake -DBUILD_TESTING:BOOL=ON -DCMAKE_BUILD_TYPE=${TRAVIS_BUILD_TYPE} ..
script:
- make
- make test