forked from ihhub/penguinV
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
68 lines (63 loc) · 1.97 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
sudo: required
language: cpp
addons:
apt:
packages:
- libpng-dev
- libjpeg-dev
- yasm
- ocl-icd-opencl-dev
- opencl-headers
matrix:
include:
- os: linux
env: CUDA=8.0.61-1 CMAKE_OPTIONS="-DPENGUINV_BUILD_TEST=ON"
before_install: source script/travis/install_cuda.sh
- os: linux
env: QT_BASE=59 CMAKE_OPTIONS=""
before_install: source script/travis/install_qt5.sh
- os: linux
env: STATIC_ANALYSIS=ON
- os: linux
env: DYNAMIC_ANALYSIS=ON PENGUINV_UNIT_TEST_RUN_COUNT=10 CMAKE_OPTIONS="-DCMAKE_BUILD_TYPE=Debug"
after_script:
- cat "${TRAVIS_BUILD_DIR}/build/Testing/Temporary/MemoryChecker.2.log" > out && cat out
- test ! -s out
addons:
apt:
update: true
packages: valgrind
- os: osx
env: QT_BASE=latest CMAKE_OPTIONS=""
before_install: source script/travis/install_qt5.sh
before_script:
# Let CMake generate build files
- |
if [[ "$STATIC_ANALYSIS" != "ON" ]]; then
mkdir -p build && cd build
cmake .. ${CMAKE_OPTIONS}
fi
script:
- |
if [[ "$STATIC_ANALYSIS" == "ON" ]]; then
export EXCLUDE_PATTERN_1=" not found in expected header ";
export EXCLUDE_PATTERN_2=" does not need to be \#included; use a forward declaration instead";
export EXCLUDE_PATTERN_3=" not found in any directly \#included header";
git clone https://github.com/myint/cppclean;
./cppclean/cppclean src test examples | grep -v "$EXCLUDE_PATTERN_1" | grep -v "$EXCLUDE_PATTERN_2" | grep -v "$EXCLUDE_PATTERN_3";
else
# Build and run tests
set -e
cmake --build .
set +e
if [[ "$DYNAMIC_ANALYSIS" == "ON" ]]; then
ctest -R unit_test --extra-verbose -T MemCheck # execute unit_test only
else
ctest -E 'perf_test' --extra-verbose # execute unit_test and unit_test_opencl
fi
fi
- |
if [[ $CUDA ]]; then
cd ../test/unit_tests/cuda;
make;
fi