-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
86 lines (72 loc) · 2.51 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
language: cpp
matrix:
include:
- os: osx
compiler: clang
osx_image: xcode9.2
- os: linux
compiler: gcc
addons:
apt:
update: true
cache:
directories:
- build/lib
- build/jthread
- build/jrtplib
git:
submodules: false
before_install:
- set -o pipefail
- git submodule update --init --recursive
install:
- |
if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
brew update
brew install qt
brew install lcov
brew install boost
export PATH=/usr/local/opt/qt/bin:${PATH}
fi
- |
if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
sudo apt install lcov
# Download Qt 5.10.1
echo
echo "Downloading Qt..."
curl -L https://www.dropbox.com/s/f1xo8wbypvax9hr/qt-portable-ubuntu-16.04-v2.tar.gz?dl=1 -o $HOME/qt-portable-ubuntu-16.04-v2.tar.gz
mkdir $HOME/qt
tar -xzf $HOME/qt-portable-ubuntu-16.04-v2.tar.gz -C $HOME/qt --strip-components 1
qt_version="5.10.1"
export PATH=$HOME/qt/${qt_version}/gcc_64/bin:${PATH}
export LD_LIBRARY_PATH=$HOME/qt/${qt_version}/gcc_64/lib
export QT_PLUGIN_PATH=$HOME/qt/${qt_version}/gcc_64/plugins
export QML_IMPORT_PATH=$HOME/qt/${qt_version}/gcc_64/qml
export QML2_IMPORT_PATH=$HOME/qt/${qt_version}/gcc_64/qml
export QT_DEBUG_PLUGINS=1
export QT_IMPORT_TRACE=1
qmake -v
echo "Installed Qt ${qt_version}"
sudo apt install libboost-all-dev
fi
before_script:
- mkdir -p build
- cd build
- |
if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
cmake .. -DSS_INCLUDE_GUI_TESTS=true
fi
- |
if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
cmake .. -DSS_INCLUDE_GUI_TESTS=false
fi
- cd ..
script:
- ./test
after_success:
- bash <(curl -s https://codecov.io/bash) -X gcov || echo "Codecov did not collect coverage reports" # Collect coverage data
- curl https://raw.githubusercontent.com/symboxtra/travis-ci-discord-webhook/master/send.sh > send.sh && chmod +x send.sh
- ./send.sh success $WEBHOOK_URL # Webhook to Discord
after_failure:
- curl https://raw.githubusercontent.com/symboxtra/travis-ci-discord-webhook/master/send.sh > send.sh && chmod +x send.sh
- ./send.sh failure $WEBHOOK_URL # Webhook to Discord