-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
65 lines (52 loc) · 2.25 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
git:
depth: 1
matrix:
include:
- name: "algorithms, tests -- linux, debug, cppcheck, coverage, gcc, 64-bit"
os: linux
dist: xenial
language: cpp
env: BUILD_TYPE="Debug"
compiler: g++
sudo: required
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-8
- cppcheck
- valgrind
install: export CC="gcc-8" export CXX="g++-8"
script:
- set -e
- cppcheck --enable=all -I include --language=c++ --platform=unix64 --std=c++11 --check-config --suppress=missingIncludeSystem
-v src
- cmake -Bbuild -H. -DCMAKE_BUILD_TYPE:STRING=$BUILD_TYPE -DCOVERAGE:BOOL=ON
- cmake --build build --target algorithms --config $BUILD_TYPE -- -j $(nproc)
- cmake -Bbuild/submodules/test-utils -Hsubmodules/test-utils -DCMAKE_BUILD_TYPE:STRING=$BUILD_TYPE
- cmake -Bbuild/tests/unit -Htests/unit
-Dalgorithms_DIR:PATH=$(pwd)/build
-Dtest-utils_DIR:PATH=$(pwd)/build/submodules/test-utils
-DCMAKE_BUILD_TYPE:STRING=$BUILD_TYPE
- cmake --build build/tests/unit --target run-all-tests-verbose --config $BUILD_TYPE -- -j $(nproc)
- bash <(curl -s https://codecov.io/bash)
- valgrind --error-exitcode=255 -v build/tests/unit/tests
- set +e
- name: "algorithms, tests -- osx, release, clang, 64-bit"
os: osx
osx_image: xcode10.1
language: cpp
env: BUILD_TYPE="Release"
compiler: clang
script:
- set -e
- cmake -Bbuild -H. -DCMAKE_BUILD_TYPE:STRING=$BUILD_TYPE
- cmake --build build --target algorithms --config $BUILD_TYPE -- -j $(sysctl -n hw.ncpu)
- cmake -Bbuild/submodules/test-utils -Hsubmodules/test-utils -DCMAKE_BUILD_TYPE:STRING=$BUILD_TYPE
- cmake -Bbuild/tests/unit -Htests/unit
-Dalgorithms_DIR:PATH=$(pwd)/build
-Dtest-utils_DIR:PATH=$(pwd)/build/submodules/test-utils
-DCMAKE_BUILD_TYPE:STRING=$BUILD_TYPE
- cmake --build build/tests/unit --target run-all-tests-verbose --config $BUILD_TYPE -- -j $(sysctl -n hw.ncpu)
- set +e