-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
46 lines (43 loc) · 1.39 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
language: cpp
matrix:
include:
- os: linux
dist: trusty
compiler: gcc
sudo: required
- os: osx
osx_image: xcode9.3
compiler: gcc
- os: osx
osx_image: xcode9.3
compiler: clang
before_install:
- |
if [ "$TRAVIS_OS_NAME" = 'osx' ]; then
brew update
brew install premake
brew install clang-format
brew install qt
fi
- |
if [ "$TRAVIS_OS_NAME" = 'linux' ]; then
sudo apt-get -qq update -y
sudo apt-get install premake4 -y
sudo apt-get install clang-format -y
sudo apt-get install qtbase5-dev qtdeclarative5-dev -y
sudo ln -s /usr/bin/make /usr/bin/gmake
fi
script:
- |
for filename in source/*.hpp test/*.cpp; do
formatted_filename="$(dirname $filename)/formatted_$(basename $filename)"
clang-format $filename > $formatted_filename
if [ "$(diff $filename $formatted_filename)" != '' ]; then
printf "'$filename' is not properly formatted, run \`clang-format -i $filename\`\n"
printf "$(diff $filename $formatted_filename)\n"
fi
rm $formatted_filename
done
- premake4 gmake || travis_terminate 1
- cd build || travis_terminate 1
- make || travis_terminate 1