-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy path.travis.yml
90 lines (75 loc) · 3.02 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
language: cpp
jobs:
include:
# Main job: g++7 on Ubuntu
- addons:
apt:
packages:
- g++-7
- gcc-7
- libboost-all-dev
- libgtest-dev
os: linux
dist: bionic
# This is the main job. We need all the tooling
before_install:
- sudo pip install cmake
- sudo wget https://github.com/google/gtest-parallel/archive/3ca6798e2c2a06708888611bc5147bd1266f97a0.zip -O gtest-parallel.zip
- sudo mkdir gtest-parallel
- sudo unzip -j -d gtest-parallel gtest-parallel.zip
- sudo cp gtest-parallel/gtest_parallel.py /usr/bin/gtest_parallel.py
- cd "${TRAVIS_BUILD_DIR}"
- pip install --user cpp-coveralls
# Yes, we override this. This is just here so that the job is appropriately named
compiler:
- gcc
install:
- export CXX="/usr/bin/g++-7" CC="/usr/bin/gcc-7"
# This is the main job. Build, test, report coverage
script:
- mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Coverage .. && make && cd test
- travis_wait 30 python /usr/bin/gtest_parallel.py -w 2 --print_test_times ./run_tests
after_success:
- cd ../.. && coveralls --root . -E '/usr/*' -E '.*gtest.*' -e benchmark -e examples -e test --build-root=./build
# Secondary job: clang 7 on Ubuntu
- addons:
apt:
packages:
- clang-7
- llvm-7-dev
- libboost-all-dev
- libgtest-dev
os: linux
dist: bionic
# In this job, we run tests against an optimized build. Install everything but coveralls
before_install:
- sudo pip install cmake
- sudo wget https://github.com/google/gtest-parallel/archive/3ca6798e2c2a06708888611bc5147bd1266f97a0.zip -O gtest-parallel.zip
- sudo mkdir gtest-parallel
- sudo unzip -j -d gtest-parallel gtest-parallel.zip
- sudo cp gtest-parallel/gtest_parallel.py /usr/bin/gtest_parallel.py
- cd "${TRAVIS_BUILD_DIR}"
# Yes, we override this. This is just here so that the job is appropriately named
compiler:
- clang
# Travis ships a broken clang that does not find gold. Use our custom one.
install:
- export CXX="/usr/bin/clang++-7" CC="/usr/bin/clang-7"
# Build and test against an optimized build
script:
- mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release .. && make && cd test
- travis_wait 30 python /usr/bin/gtest_parallel.py -w 2 --print_test_times ./run_tests
# Secondary job: clang 7 on Mac OS
- addons:
homebrew:
packages:
- boost
- cmake
os: osx
osx_image: xcode11
# Yes, we override this. This is just here so that the job is appropriately named
compiler:
- clang
# Secondary job. Build only, but build everything
script:
- mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release .. && make