-
Notifications
You must be signed in to change notification settings - Fork 24
/
.travis.yml
51 lines (50 loc) · 1.38 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
dist: trusty
sudo: required
language:
- cpp
compiler:
- gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-6
- g++-6
- cmake
script:
# Link gcc-6 and g++-6 to their standard commands
- sudo ln -s /usr/bin/gcc-6 /usr/local/bin/gcc
- sudo ln -s /usr/bin/g++-6 /usr/local/bin/g++
# Export CC and CXX to tell cmake which compiler to use
- export CC=/usr/bin/gcc-6
- export CXX=/usr/bin/g++-6
# Check versions of gcc, g++ and cmake
- gcc -v && g++ -v && cmake --version
# Go into the source root directory
- cd $TRAVIS_BUILD_DIR
# Build: Google Test / Google Mock
- cd ./dep/
- git clone https://github.com/google/googletest.git
- cd ./googletest/
- mkdir build
- cd ./build/
- cmake ../ -G"Unix Makefiles"
- make
# Build: Shaka Scheme
- cd ../../../
- mkdir cmake-build-debug
- cd ./cmake-build-debug/
- cmake ../ -G"Unix Makefiles"
- make
- ls
# Copy any required shared libraries over to operating directory
- cp ./lib/* ./bin/tst/
- ls ./bin/
- ls ./bin/tst/
# Run unit tests
- run_unit () { for file in ./bin/tst/unit-*; do "$file" || exit 1337; done }
- run_unit
# Run integration tests
- run_integ () { for file in ./bin/tst/unit-*; do "$file" || exit 1337; done }
- run_integ