-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
29 lines (24 loc) · 903 Bytes
/
.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
language: cpp
compiler: gcc
before_install:
- if [ "$CXX" == "g++" ]; then sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test; fi
- sudo apt-get update -qq
- sudo apt-get -qq update
- sudo apt-get install -y libgtest-dev valgrind
- sudo wget https://github.com/google/googletest/archive/release-1.7.0.tar.gz
- sudo tar xf release-1.7.0.tar.gz
- cd googletest-release-1.7.0
- sudo cmake -DBUILD_SHARED_LIBS=ON .
- sudo make
- sudo cp -a include/gtest /usr/include
- sudo cp -a libgtest_main.so libgtest.so /usr/lib/
- which valgrind
- cd "${TRAVIS_BUILD_DIR}"
install:
# install g++ 6, if tests are run with g++
- if [ "$CXX" == "g++" ]; then sudo apt-get install -qq g++-6; fi
- if [ "$CXX" == "g++" ]; then sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-6 50; fi
script:
- cd Tests
- make
- if [ "`echo $CXX`" == "g++" ]; then ./a.out; fi