forked from chewing/chewing-editor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
71 lines (58 loc) · 2.03 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
language: cpp
os:
- linux
- osx
env:
matrix:
- CTEST_OUTPUT_ON_FAILURE=1
- CTEST_OUTPUT_ON_FAILURE=1 CFLAGS='-fsanitize=address'
- CTEST_OUTPUT_ON_FAILURE=1 OPTION='-DCMAKE_CXX_FLAGS=-O0 -DENABLE_GCOV=yes' COVERALLS=yes
matrix:
exclude:
- os: osx
env: CTEST_OUTPUT_ON_FAILURE=1 CFLAGS='-fsanitize=address'
- os: osx
env: CTEST_OUTPUT_ON_FAILURE=1 OPTION='-DCMAKE_CXX_FLAGS=-O0 -DENABLE_GCOV=yes' COVERALLS=yes
git:
depth: 1
# opt-in Ubuntu Trusty
sudo: required
dist: trusty
cache: ccache
install:
- |
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
pip install --user cpp-coveralls
sudo add-apt-repository --yes ppa:chewing/chewing
sudo apt-get update
sudo apt-get install --yes cmake help2man qt5-default qttools5-dev-tools libchewing3-dev
gcc --version
g++ --version
gcov --version
fi
- |
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
export CC=gcc-4.8 CXX=g++-4.8
# dependencies
brew update > /dev/null && brew install ccache libchewing cmake qt5
# ccache
export PATH="/usr/local/opt/ccache/libexec:$PATH"
# Qt
brew link --force qt5
ln -s /usr/local/Cellar/qt5/5.6.0/mkspecs /usr/local/mkspecs && ln -s /usr/local/Cellar/qt5/5.6.0/plugins /usr/local/plugins
# qtchooser
cd "$HOME"
git clone --depth 1 https://code.qt.io/qt/qtchooser.git && cd qtchooser
make -j2 && sudo make install
qtchooser -install 5 /usr/local/bin/qmake
fi
- ccache -V && ccache --show-stats && ccache --zero-stats && export use_ccache=true
script:
- cd "$TRAVIS_BUILD_DIR"
- cmake $OPTION .
- make -j2
- make -j2 check
after_success:
- if [ x$COVERALLS == xyes ]; then coveralls --exclude gmock --exclude test --exclude-pattern '.*CMake[^/]+\.c(?:pp)?' --exclude-pattern '.*_automoc.cpp'; fi
after_script:
- if [ "$use_ccache" = true ]; then ccache --show-stats ; fi