-
Notifications
You must be signed in to change notification settings - Fork 17
/
.travis.yml
53 lines (53 loc) · 1.57 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
notifications:
email:
on_success: never
language: cpp
matrix:
include:
- os: linux
dist: trusty
sudo: required
env: BUILD_TYPE=Debug
- os: linux
dist: trusty
sudo: required
env: BUILD_TYPE=Release
- os: osx
env: BUILD_TYPE=Debug
- os: osx
env: BUILD_TYPE=Release
sudo: false
env:
global:
- NINJA_STATUS="[%p %u/%t@%o %r]"
- PROJECT_NAME=${PWD##*/}
- CMAKE_PREFIX_PATH=/usr/local/opt/qt5:$CMAKE_PREFIX_PATH
- LIBJPEGTURBO_ROOT=/usr/local/opt/jpeg-turbo
addons:
apt:
packages:
- cppcheck
- clang-format-3.8
- doxygen
- ninja-build
- libboost-all-dev
- freeglut3-dev
- libxi-dev
- libxmu-dev
- libjpeg-turbo8-dev
- libturbojpeg
- qtbase5-dev
- qtdeclarative5-dev
- libqt5opengl5-dev
before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew outdated cmake || brew upgrade cmake; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install cppcheck doxygen ninja clang-format jpeg-turbo qt5; fi
script:
- mkdir $BUILD_TYPE
- cd $BUILD_TYPE
- cmake -GNinja -DCLONE_SUBPROJECTS=ON -DCMAKE_INSTALL_PREFIX=$PWD/install -DCMAKE_BUILD_TYPE=$BUILD_TYPE ..
- ninja all && ninja $PROJECT_NAME-tests && ninja smoketests
- find . -name '*.[hc]' -o -name '*.[hci]pp' -o -name '*.frag' -o -name '*.vert' -o -name '*.ispc' -o -name '*.ih' | grep -v 'CMake/common' | xargs clang-format -style=file -fallback-style=none -i
- git diff
- git diff-index --quiet HEAD --