forked from oclint/oclint
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
97 lines (92 loc) · 2.55 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
93
94
95
96
97
language: cpp
matrix:
include:
- os: linux
dist: bionic
sudo: required
env: BUILD="test" MODULE="core"
- os: linux
dist: bionic
sudo: required
env: BUILD="test" MODULE="metrics"
- os: linux
dist: bionic
sudo: required
env: BUILD="test" MODULE="rules" DEP="core metrics"
- os: linux
dist: bionic
sudo: required
env: BUILD="test" MODULE="reporters" DEP="core"
- os: linux
dist: bionic
sudo: required
env: BUILD="test" MODULE="driver" DEP="core"
- os: linux
dist: bionic
sudo: required
env: BUILD="build"
- os: linux
dist: bionic
sudo: required
env: BUILD="docgen"
- os: osx
osx_image: xcode11.5
env: BUILD="test" MODULE="core"
- os: osx
osx_image: xcode11.5
env: BUILD="test" MODULE="metrics"
- os: osx
osx_image: xcode11.5
env: BUILD="test" MODULE="rules" DEP="core metrics"
- os: osx
osx_image: xcode11.5
env: BUILD="test" MODULE="reporters" DEP="core"
- os: osx
osx_image: xcode11.5
env: BUILD="test" MODULE="driver" DEP="core"
- os: osx
osx_image: xcode11.5
env: BUILD="build"
- os: osx
osx_image: xcode11.5
env: BUILD="docgen"
before_install:
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y;
sudo apt-get update -q;
sudo apt-get install gcc-7 g++-7 -y --allow-unauthenticated;
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 50;
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7 50;
fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then
HOMEBREW_NO_AUTO_UPDATE=1 brew install pyenv;
eval "$(pyenv init -)";
pyenv install 3.8.2;
pyenv global 3.8.2;
pyenv rehash;
pip install cpp-coveralls;
pyenv rehash;
else
sudo pip install --upgrade cpp-coveralls;
fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then
HOMEBREW_NO_AUTO_UPDATE=1 brew install ninja;
else
sudo apt-get install ninja-build -y;
fi
script:
- cd oclint-scripts
- ./travis $BUILD $MODULE $DEP
- cd ..
after_success:
- if [ $BUILD == test ] && [ $MODULE != driver ]; then
if [ $TRAVIS_OS_NAME == osx ]; then
coveralls --gcov $PWD/build/llvm-install/bin/llvm-cov --gcov-options gcov --include oclint-${MODULE}/ --exclude oclint-${MODULE}/test;
else
coveralls --include oclint-${MODULE}/ --exclude oclint-${MODULE}/test;
fi
fi
addons:
artifacts:
paths:
- $(ls build/oclint-*.tar.gz)