-
Notifications
You must be signed in to change notification settings - Fork 18
/
.travis.yml
45 lines (45 loc) · 1.4 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
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##*/}
addons:
apt:
packages:
- cppcheck
- clang-format-3.8
- doxygen
- ninja-build
- libboost-all-dev
- python3-pyparsing
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; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then pip install pyparsing; 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 $PROJECT_NAME-smoketests
- find . -name '*.[hc]' -o -name '*.[hci]pp' -o -name '*.frag' -o -name '*.vert' -o -name '*.ispc' -o -name '*.ih' | grep -v 'CMake/common' | grep -v 'cppnetlib/' | xargs clang-format -style=file -fallback-style=none -i
- git diff
- git diff-index --quiet HEAD --