forked from ihhub/penguinV
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
92 lines (87 loc) · 3.11 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
sudo: required
language: cpp
addons:
apt:
packages:
- libpng-dev
- libjpeg-dev
- yasm
- ocl-icd-opencl-dev
- opencl-headers
- clang-format-3.9
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
before_install:
- |
if [[ "$TRAVIS_PULL_REQUEST" != "false" ]]; then
curl -L http://llvm.org/svn/llvm-project/cfe/trunk/tools/clang-format/clang-format-diff.py -o $TRAVIS_BUILD_DIR/script/clang-format-diff.py;
fi
script:
- 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";
- cd ${TRAVIS_BUILD_DIR}
- |
if [[ "$TRAVIS_PULL_REQUEST" != "false" ]]; then
echo "Checking clang-format between TRAVIS_BRANCH=$TRAVIS_BRANCH and TRAVIS_PULL_REQUEST_BRANCH=$TRAVIS_PULL_REQUEST_BRANCH"
bash $TRAVIS_BUILD_DIR/script/check_code_format.sh
else
echo "Skipping clang-format check since this is not a pull request."
fi
- 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: linux
language: python
python: 3.6
env: SWIG=ON
before_script:
- wget https://github.com/swig/swig/archive/rel-3.0.12.tar.gz
- tar xzf rel-3.0.12.tar.gz && cd swig-rel-3.0.12
- ./autogen.sh
- ./configure --prefix=${HOME}/swig/
- make
- make install
- export PATH=${HOME}/swig/bin:$PATH
- swig -version
- python --version
script:
- cd $TRAVIS_BUILD_DIR/src/python && python setup.py build_ext --inplace
- cd $TRAVIS_BUILD_DIR/examples/python && python bitmap_operation.py
- 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:
- |
# 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