forked from mcallegari/qlcplus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis-ci.sh
executable file
·32 lines (26 loc) · 877 Bytes
/
.travis-ci.sh
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
#!/bin/bash
# This script is triggered from the script section of .travis.yml
# It runs the appropriate commands depending on the task requested.
export QMAKE=/opt/qt514/bin/qmake
if [ "$TASK" = "coverage" ]; then
gem install coveralls-lcov
fi
# Report the compiler version
$CXX --version
# Report the qmake version
$QMAKE -v
# Otherwise compile and check as normal
if [ "$TASK" = "compile" ]; then
if [ "$QT" = "qt5" ]; then
$QMAKE QMAKE_CXX=$CXX QMAKE_CC=$CC QMAKE_LINK=$CXX QMAKE_LINK_SHLIB=$CXX && make && make check
exit $?
fi
if [ "$QT" = "qt5qml" ]; then
$QMAKE QMAKE_CXX=$CXX QMAKE_CC=$CC QMAKE_LINK=$CXX QMAKE_LINK_SHLIB=$CXX CONFIG+=qmlui && make && make check
exit $?
fi
fi
if [ "$TASK" = "coverage" ]; then
$QMAKE CONFIG+=coverage QMAKE_CXX=$CXX QMAKE_CC=$CC QMAKE_LINK=$CXX QMAKE_LINK_SHLIB=$CXX && make && make lcov
exit $?
fi