-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
84 lines (76 loc) · 2.71 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
# .travis.yml
sudo: required
language: cpp
git:
depth: 5
cache:
- directories:
- ~/.cache/apt # This must be accessible for non-root users
matrix:
include:
# Code Style
- os: linux
name: "CODE::STYLE"
dist: xenial
compiler: clang-format
env:
- MATRIX_EVAL=""
before_script:
- wget https://raw.githubusercontent.com/Sarcasm/run-clang-format/master/run-clang-format.py
- chmod +x run-clang-format.py
script:
- ./run-clang-format.py -r src
# Code Quality
- os: linux
name: "CODE::QUALITY"
dist: xenial
compiler: clang
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- sourceline: 'ppa:jonathonf/development-tools'
env:
- MATRIX_EVAL="CC=clang && CXX=clang++"
before_script:
- chmod +x ${TRAVIS_BUILD_DIR}/.travis.cache && ${TRAVIS_BUILD_DIR}/.travis.cache --load
- sudo apt-get update
- sudo apt-get install -y --no-install-recommends --no-install-suggests
gcc-8 g++-8 libtbb-dev libharfbuzz-bin libharfbuzz-dev libxrandr-dev
libxi-dev libxinerama-dev libxcursor-dev libgl1-mesa-dev
libglu1-mesa-dev cppcheck clang
- ${TRAVIS_BUILD_DIR}/.travis.cache --save
- eval "$(curl -sL https://raw.githubusercontent.com/ryuichis/oclint-cpp-travis-ci-examples/master/oclint-ci-install.sh)"
- cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -H. -Bbuild
script:
- /usr/bin/cppcheck --quiet
--enable=style,performance,portability,missingInclude
--error-exitcode=1 --force --inline-suppr --suppressions-list=.cppcheck
--platform=unix64 --std=c++14 --language=c++ -I src main.cpp src/*
- oclint-json-compilation-database
-e Libs -e external -e asge -e _deps
-enable-clang-static-analyzer -p ./build
# Linux GCC Build
- os: linux
name: "CODE::BUILD"
dist: xenial
compiler: cmake
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- sourceline: 'ppa:jonathonf/development-tools'
env:
- MATRIX_EVAL="CC=gcc-8 && CXX=g++-8"
before_script:
- chmod +x ${TRAVIS_BUILD_DIR}/.travis.cache && ${TRAVIS_BUILD_DIR}/.travis.cache --load
- sudo apt-get update
- sudo apt-get install -y --no-install-recommends --no-install-suggests
gcc-8 g++-8 libtbb-dev libharfbuzz-bin libharfbuzz-dev libxrandr-dev
libxi-dev libxinerama-dev libxcursor-dev libgl1-mesa-dev libglu1-mesa-dev
- ${TRAVIS_BUILD_DIR}/.travis.cache --save
- cmake -H. -Bbuild
script:
- cmake --build build
before_install:
- eval "${MATRIX_EVAL}"