-
Notifications
You must be signed in to change notification settings - Fork 4
/
.travis.yml
108 lines (91 loc) · 3.93 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
git:
depth: 1
matrix:
include:
- name: "function-loader, example, tests -- linux, debug, cppcheck, coverage, g++, 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++-6
- cppcheck
before_install:
- pip install --user cpp-coveralls
install: export CXX="g++-6"
script:
- set -e
- cppcheck --enable=all
-I include
--language=c++
--platform=unix64
--std=c++11
--check-config
--suppress=missingIncludeSystem
-v ./tests
- cmake -Bbuild -H. -DCMAKE_BUILD_TYPE:STRING=$BUILD_TYPE
- cmake -Bbuild/example -Hexample -Dfunction-loader_DIR:PATH=$(pwd)/build -DCMAKE_BUILD_TYPE:STRING=$BUILD_TYPE
- cmake --build build/example --config $BUILD_TYPE
- pushd build/example
- ./example
- popd
- cmake -Bbuild/submodules/test-utils -Hsubmodules/test-utils -DCMAKE_BUILD_TYPE:STRING=$BUILD_TYPE
- cmake -Bbuild/tests/unit -Htests/unit
-Dfunction-loader_DIR:PATH=$(pwd)/build
-Dtest-utils_DIR:PATH=$(pwd)/build/submodules/test-utils
-DCMAKE_BUILD_TYPE:STRING=$BUILD_TYPE
-DCOVERAGE:BOOL=ON
- cmake --build build/tests/unit --target run-all-tests-verbose --config $BUILD_TYPE -- -j $(nproc)
- bash <(curl -s https://codecov.io/bash)
- set +e
- name: "function-loader, example, tests -- osx, release with debug info, valgrind, clang++, 64-bit"
os: osx
osx_image: xcode10.1
language: cpp
env: BUILD_TYPE="RelWithDebInfo"
compiler: clang
before_install:
- brew install valgrind
script:
- set -e
- cmake -Bbuild -H. -DCMAKE_BUILD_TYPE:STRING=$BUILD_TYPE
- cmake -Bbuild/example -Hexample -Dfunction-loader_DIR:PATH=$(pwd)/build -DCMAKE_BUILD_TYPE:STRING=$BUILD_TYPE
- cmake --build build/example --config $BUILD_TYPE
# RVM overrides these shell built-ins for Ruby, but we need to use these
- unset -f pushd && unset -f popd
- pushd build/example
- valgrind --error-exitcode=255 -v ./example
- popd
- cmake -Bbuild/submodules/test-utils -Hsubmodules/test-utils -DCMAKE_BUILD_TYPE:STRING=$BUILD_TYPE
- cmake -Bbuild/tests/unit -Htests/unit
-Dfunction-loader_DIR:PATH=$(pwd)/build
-Dtest-utils_DIR:PATH=$(pwd)/build/submodules/test-utils
-DCMAKE_BUILD_TYPE:STRING=$BUILD_TYPE
-DCOVERAGE:BOOL=ON
- cmake --build build/tests/unit --target run-all-tests-verbose --config $BUILD_TYPE -- -j $(sysctl -n hw.ncpu)
- set +e
- name: "function-loader, example, tests -- windows, release, msvc, 32-bit"
os: windows
language: cpp
env: BUILD_TYPE="Release"
script:
- set -e
- cmake -Bbuild -H. -DCMAKE_BUILD_TYPE:STRING=$BUILD_TYPE
- cmake -Bbuild/example -Hexample -Dfunction-loader_DIR:PATH=$(pwd)/build -DCMAKE_BUILD_TYPE:STRING=$BUILD_TYPE
- cmake --build build/example --config $BUILD_TYPE
- pushd build/example/$BUILD_TYPE
- start example.exe
- popd
- cmake -Bbuild/submodules/test-utils -Hsubmodules/test-utils -DCMAKE_BUILD_TYPE:STRING=$BUILD_TYPE
- cmake -Bbuild/tests/unit -Htests/unit
-Dfunction-loader_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
- set +e